ps
ps displays information about a selection of the active processes. If you want a repetitive update of the selection and the displayed information, use top instead.[1]
Documentation
- man 1 'ps' [EN]
Further information
- ps Command Examples (05.03.2024) [EN] @ It's FOSS
Syntax
ps [PARAMETER ...]
Parameters
- -e
- Select all processes. Identical to -A.
- -f
- Does full-format listing. This option can be combined with many other UNIX-style options to add additional columns. It also causes the command arguments to be printed.
- --forest
- ASCII art process tree.
- -H
- Show process hierarchy (forest).
Examples
- Start a program (dropbox) if it is not already running
if [[ $(ps -eo 'args' | grep 'dropbox' | grep -cv 'grep') -eq 0 ]]; then
${HOME}/.dropbox-dist/dropbox &
fi
References
- ↑ man 1 'ps'