This is an old revision of the document!
fdupes --recurse dir1/ dir2/
grep -rnw '/path/to/files/' -e "pattern"
find / -type s
find . -type f -printf '%T@ %P\n' | sort -n | awk '{print $2}'
diff -y file1 file2 | less
diff <(ls -a /dir1/) <(ls -a /dir 2/)
or compare
comm <(ls -a /dir/) <(ls -a /dir2/)
kill $(ps aux | grep "$process_term" | grep -v 'grep' | awk '{print $2}')
cat /dev/null > modsec_audit.log
See also “log rotate” on mL wiki.
rm -rf !(filename)
This works only if extglob is enabled. So
shopt -s extglob
php -r "print phpinfo();" | grep ".ini"
or
php -i | grep in
apt-get install --reinstall `dpkg -l | grep 'ii php7' | awk '{ printf($2" "); next}'`
* limiting by date range
sed -n '/8\/Oct\/2019/,/8\/Oct\/2019/ p' access.log