This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
linux-commandline-tips [2017/03/04 09:02] serbizadmin |
linux-commandline-tips [2018/11/30 05:10] serbizadmin |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ~~NOTOC~~ | ||
+ | ====== Find Stuff====== | ||
* looking for duplicate filenames in 2 directories | * looking for duplicate filenames in 2 directories | ||
- | | + | < |
+ | fdupes --recurse dir1/ dir2/ </ | ||
* find a word in a file | * find a word in a file | ||
- | | + | < |
+ | grep -rnw '/ | ||
+ | * find all socket files your system runs | ||
+ | < | ||
+ | find / -type s | ||
+ | </ | ||
+ | ====== Maintenance====== | ||
+ | * kill a process wholesale | ||
+ | < | ||
+ | kill $(ps aux | grep " | ||
+ | * trim log. example: | ||
+ | < | ||
+ | cat /dev/null > modsec_audit.log</ | ||
+ | See also "log rotate" |