ps—reports process status

ps [ –acdefjl ] [ –g grplist ] [ –p proclist ] [ –s sidlist ] [ –t term ] [ –u uidlist ]

ps prints information about active processes. Without options, ps prints information about processes associated with the controlling terminal. The output contains only the process ID, terminal identifier, cumulative execution time, and the command name. Otherwise, the information that is displayed is controlled by the options. The ps options are not the same for AT&T and Berkeley type versions of UNIX.

Example A.33.
1   ps -aux | grep '^linda'      #  ucb
2   ps -ef | grep '^ *linda'     # at&t
				

EXPLANATION

  1. Prints all processes running and pipes the output to the grep program, and printing only those processes owned by user linda, where linda ...

Get UNIX® Shells by Example, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.