Deutsch English Français Italiano |
<v8kl22$3ajo6$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!feeds.phibee-telecom.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Rene Kita <mail@rkta.de> Newsgroups: comp.unix.shell Subject: Re: Basic ps Tips Date: Sat, 3 Aug 2024 07:08:50 -0000 (UTC) Organization: A noiseless patient Spider Lines: 29 Sender: Rene Kita <kt@ob.rkta.de> Message-ID: <v8kl22$3ajo6$1@dont-email.me> References: <v81fmh$32fuh$5@dont-email.me> <v8bja7$16ghh$1@dont-email.me> <v8h8ne$2eq4k$1@dont-email.me> Injection-Date: Sat, 03 Aug 2024 09:08:50 +0200 (CEST) Injection-Info: dont-email.me; posting-host="97e2ffe9698576b37fdb104cea396460"; logging-data="3493638"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+CF/2BkOvtGO/Ui80/U8jQ" User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (OpenBSD/7.5 (amd64)) Cancel-Lock: sha1:GDJPvn6wNuxj5qGgFez54wWo5Vo= Bytes: 1842 Jerry Peters <jerry@example.invalid> wrote: > Lawrence D'Oliveiro <ldo@nz.invalid> wrote: >> On Sat, 27 Jul 2024 00:40:49 -0000 (UTC), I wrote: [...] >> ps -p$(pgrep -d, bash) -wwo pid,ppid,lstart,tty,etime,cmd >> >> to report all the bash sessions I have running (quite a lot). The ???ww??? >> says not to truncate the output, which is handy for long command lines. > > Or just use ps -C <command>: [...] > Does noone know about -C? I keep seeing things like 'ps -ef | grep > <something> in scripts to see if <something is running, rather than > using 'ps -C'. I did not know about it. The man page on OpenBSD does not mention -C, but calling 'ps -C' does not give an error. But: #v+ $ ps -C ksh ps: /dev/mem: Permission denied' #v- Dunno what to make out of it, but apparently one reason to use grep instead of -C is portability. > Jerry Rene