Basic Linux tricks
Last updated on April 25, 2010, 20:59 by Sebastian Mihai
If you're going to delete a larger number of files based on some regular expression, use the regexp with
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)
collector should now contain your log fragment, which you can inspect.
If you use the materials on this page, or any other page on this web site, you do so at your own risk. They are provided "as is". No warranty is provided or implied. I neither guarantee that the materials will work, nor that they will not be harmful in any way.