mirror of
https://github.com/cheat/cheat.git
synced 2025-07-05 13:21:58 +02:00
[PS,GREP] Exclude grep from your grepped output of ps.
This commit is contained in:
@ -20,3 +20,7 @@ grep -E "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" file #Find IP add
|
|||||||
# Find all files who contain {pattern} in the directory {directory}.
|
# Find all files who contain {pattern} in the directory {directory}.
|
||||||
# This will show: "file:line my research"
|
# This will show: "file:line my research"
|
||||||
grep -rnw 'directory' -e "pattern"
|
grep -rnw 'directory' -e "pattern"
|
||||||
|
|
||||||
|
# Exclude grep from your grepped output of ps.
|
||||||
|
# Add [] to the first letter. Ex: sshd -> [s]shd
|
||||||
|
ps aux | grep '[h]ttpd'
|
||||||
|
@ -9,3 +9,7 @@ ps -aufoouser
|
|||||||
|
|
||||||
# To list every process with a user-defined format:
|
# To list every process with a user-defined format:
|
||||||
ps -eo pid,user,command
|
ps -eo pid,user,command
|
||||||
|
|
||||||
|
# Exclude grep from your grepped output of ps.
|
||||||
|
# Add [] to the first letter. Ex: sshd -> [s]shd
|
||||||
|
ps aux | grep '[h]ttpd'
|
||||||
|
Reference in New Issue
Block a user