moodLearning Wiki

This is an old revision of the document!


  • looking for duplicate filenames in 2 directories
fdupes --recurse dir1/ dir2/ 
  • find a word in a file
grep -rnw '/path/to/files/' -e "pattern"
  • kill a process wholesale
kill $(ps aux | grep "$process_term" | grep -v 'grep' | awk '{print $2}')
  • trim log. example:
cat /dev/null > modsec_audit.log

See also “log rotate” on mL wiki.