All writing

Useful Shell Commands

I’m not an expert at all with the linux shell. I know how to run a LAMP stack, but that is about it. Every blue moon I need to use a command that I used last blue moon, but forgot how. This list will now be my list to write down the cool “commands” I learn to accomplish different tasks. That way I don’t have to bug people on #uphpu about it. ;)

  • How many files in a folder? - ls -1 | wc -l
  • How much disk space is a folder taking up? - du -sh .
  • Truncate/Empty a file - cat /dev/null > file.log

I’ll keep adding to the list as I continue my work with Linux.

Sheet
A-3 · Detail
Drawn
Utah
Scale
1:1
Rev
2026