[back]
Basic Linux tricks
If you're going to delete a larger number of files based on some regular expression, use the regexp with ls first. You will avoid surprises this way.

Use ls -ltrh unless you have a good reason not to. It will show extra information, sort chronologically ascending, and display file sizes in "human" format, such as 120M, or 50G.

"less is more" - if you're accustomed to using more, switch to less as soon as possible!
  • B will go back one page
  • Space will advance one page
  • > will advance to the end
  • < will go to the beginning
  • Enter will advance one line


Want to capture fragments of a real-time log that's scrolling fast (perhaps to capture the log output of a specific action that you wish to debug)?
  • tail -f logfile > collector (Hit enter right before you're about to perform the action you want to log)
  • (perform action)
  • Ctrl-C
collector should now contain your log fragment, which you can inspect.