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}'
du -h * | grep '^\s*[0-9\.]\+G'
Change 'G' to 'M' for MB output.
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
time xz -6ve -k --threads=0 <filename>
xz file1.txt file2.txt file3.txt
xz -d file.txt.xz
unxz file.txt.xz
xz -tv <filename>.tar.xz
xzip -c file1.txt > files.xz
xzip -c file2.txt >> files.xz
xzcat test.txt.xz
test
example
text
xzgrep exa test.txt.xz
example
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