Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!snorkelwacker!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.questions Subject: Re: ps -c num bug or feature ? Message-ID: <1990Jan15.094339.4254@athena.mit.edu> Date: 15 Jan 90 09:43:39 GMT References: <1072@dutrun.UUCP> Sender: news@athena.mit.edu (News system) Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Organization: Massachusetts Institute of Technology Lines: 43 In article <1072@dutrun.UUCP>, hans@duttnph.tudelft.nl (Hans Buurman) writes: > > I don't understand the following behaviour of ps (SunOs 4.0.1): > > hans55> ps -c 23706 > ps: cannot open 23706: No such file or directory > > This should be correct according to the manual, I think. > From the SunOS manual: > > num A process number may be given, in which case the output > is restricted to that process. This option must also > be last. The manual also says (at the top): SYNOPSIS ps [ acegklnstuvwxU# ] This means that the pid number should be part of the first argument passed to ps, not in a second argument. In other words, you should have typed: ps -c23706 I'm also not convinced that the '-' is even necessary, although it probably can't hurt. The error you received is due to the fact that if ps is given a second argument, it treats that argument as the file containing the system's namelist. Again, from the man page: A second argument is taken to be the file containing the system's namelist. Otherwise, /vmunix is used. A third argument tells ps where to look for core if the k option is given, instead of /vmcore. If a fourth argument is given, it is taken to be the name of a swap file to use instead of the default /dev/drum. Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8495 Home: 617-782-0710