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
You could leave a comment if you were logged in.
lab/blog/linux_cheat_sheet.txt · Last modified: 2016/01/24 09:48 by 127.0.0.1