mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-14 23:48:43 +00:00
Update cheatsheets
This commit is contained in:
25
linux/pidof
Normal file
25
linux/pidof
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pidof
|
||||
|
||||
> Gets the ID of a process using its name.
|
||||
> More information: <https://manned.org/pidof>.
|
||||
|
||||
- List all process IDs with given name:
|
||||
|
||||
`pidof {{bash}}`
|
||||
|
||||
- List a single process ID with given name:
|
||||
|
||||
`pidof -s {{bash}}`
|
||||
|
||||
- List process IDs including scripts with given name:
|
||||
|
||||
`pidof -x {{script.py}}`
|
||||
|
||||
- Kill all processes with given name:
|
||||
|
||||
`kill $(pidof {{name}})`
|
||||
Reference in New Issue
Block a user