lab:blog:linux_cheat_sheet
Linux cheat sheet
Find the number of files in a folder
ls | wc -l
Find the size of folders
du -h --max-depth=1 foldername
Find and remove empty folders
find . -type d -empty -exec rmdir {} \;
Kill a zombie process
To find the ppid of zombie process
ps -aux |grep -w Z
kill -9 ppid
if not working, kill the parent process
cat /proc/{pid of zombie}/status | grep -i ppid