Comanda UNIX pidof tipărește identificatorul procesului (process identifier) specificat pe linia de comandă. Se mai poate folosi ps și pgrep pentru a obține același lucru.

În unele variante UNIX este implementat ca un link simbolic către comanda killall5 din System V.

Sintaxă modificare

pidof [opțiuni] program

Când este rulat dintr-un script, valorile returnate sunt:

  • 0 - cel puțin un program cu acest nume a fost găsit
  • 1 - niciun program cu acest nume nu a fost găsit


Exemple modificare

# pidof ntpd
3580 3579
# pidof emacs
22256
# pidof file
10269


Legături externe modificare


 v  d  m  Programe în linia de comandă pentru Unix (mai multe)
Management de fișiere: cat | cd | chmod | chown | chgrp | cksum | cmp | cp | du | df | file | fsck | ln | ls | lsof | mkdir | mount | mv | pwd | rm | rmdir | split | touch
Management de procese: at | chroot | cron | exit | kill | killall | nice | pgrep | pidof | pkill | ps | pstree | sleep | time | top | wait
Management utilizator/mediu: env | finger | id | mesg | passwd | su | sudo | uname | uptime | w | wall | who | whoami | write
Procesare text: awk | comm | cut | ed | ex | fmt | head | iconv | join | less | more | paste | sed | sort | tac | tail | tr | uniq | wc | xargs
Programare Shell: basename | echo | expr | false | printf | test | true | unset Imprimare:
lp
Communicații:
inetd | netstat | ping | rlogin | traceroute
Căutare:
find | grep | strings
Diverse:
banner | bc | cal | dd | man | size | yes