Pgrep

Pgrep

pgrep is a command line utility initially written for use with the Solaris 7 operating system. It has since been reimplemented for Linux and OpenBSD. It searches for all the named processes, that can be specified as extended regular expression patterns, and, by default, returns their ID. Alternatives include pidof and ps.

Example usage

pgrep's default behaviour (returning the process id(s) of the named task(s)) is invoked by typing::pgrep "taskname"This is roughly equivalent to the following command::ps ax | grep "taskname" | grep -v grep | awk '{print $1}'Hence, pgrep simplifies an otherwise complex task. pgrep also has additional functionality, e.g.:
*Show all processes (in long form, ID and name) belonging to the "other" group:::pgrep -l -G other
*Show all process not belonging to "root" user:::pgrep -v -u root

ee also

*List of Unix programs
*pkill – signal processes based on name and other attributes
*ps – display the currently running processes
*grep – search for lines of text that match one or many regular expressions

References

*man|1|pgrep|Linux|look up processes based on name and other attributes


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Pgrep — Saltar a navegación, búsqueda pgrep es una utilidad de la línea de comandos escrita originalmente para ser usada con el sistema operativo Solaris 7. Desde entonces se ha reimplementado para Linux y OpenBSD. Usualmente, pgrep toma una expresión… …   Wikipedia Español

  • Pgrep — ist ein Kommandozeilenprogramm, das ursprünglich für das Solaris 7 Betriebssystem entwickelt wurde. Seither wurde jedoch auch eine quelloffene Version für GNU/Linux und OpenBSD entworfen. Das Programm sucht nach allen benannten Prozessen, die als …   Deutsch Wikipedia

  • Pgrep — утилита, просматривающая активные процессы в системе и выдающая идентификаторы процессов, атрибуты которых соответствуют указанным в командной строке запросам. Изначально pgrep была написана для ОС Solaris 7, позже реализована для GNU/Linux и… …   Википедия

  • pgrep — ist ein Kommandozeilenprogramm, das ursprünglich für das Solaris 7 Betriebssystem entwickelt wurde. Seither wurde jedoch auch eine Version für GNU/Linux und OpenBSD geschrieben. Das Programm sucht nach allen benannten Prozessen, die als Reguläre… …   Deutsch Wikipedia

  • pgrep — утилита, просматривающая активные процессы в системе и выдающая идентификаторы процессов, атрибуты которых соответствуют указанным в командной строке запросам. Изначально pgrep была написана для ОС Solaris 7, позже реализована для GNU/Linux и… …   Википедия

  • Pidof — программа в операционной системе Linux, находящая идентификатор процесса (PID) работающего процесса(ов) по имени программы и выводящая его на стандартный вывод. На некоторых системах эта программа используется в скриптах изменения уровня запуска …   Википедия

  • procfs — (or the proc filesystem) is a special filesystem in UNIX like operating systems that presents information about processes and other system information in a hierarchical file like structure, providing a more convenient and standardized method for… …   Wikipedia

  • Kill (Unix) — kill (engl. töten) ist ein Unix Kommando und gleichnamiger Systemaufruf, um unter dem Betriebssystem laufenden Prozessen Signale zu schicken. Standardmäßig wird dabei das Signal SIGTERM versendet, welches den entsprechenden Prozess dazu… …   Deutsch Wikipedia

  • Pidof — ist ein Programm für Linux, das die Prozessnummer (PID, Process ID) eines oder mehrerer laufenden Prozesse ausgibt. Unter anderen Kerneln werden oft pgrep oder ps als Alternativen verwendet. pidof wird normalerweise als Symbolische Verknüpfung zu …   Deutsch Wikipedia

  • Программы UNIX-подобных операционных систем — Это список популярных программ, работающих в операционных системах основанных на UNIX (POSIX совместимых). Некоторые из этих программ являются стандартными для UNIX подобных систем. Содержание 1 Системный софт 1.1 Общего назначения …   Википедия

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”