Command Line Tips for Linux
I’m still learning Linux little by little myself, I just use it on a couple web servers, so I don’t actually have to use it too much, so the command don’t stick with me for very long, hehe. Seomoz.org has a post today about command line tricks in Linux, and about every comment adds some more, so this is a really good page to reference if you are still learning how to use Linux. Here are two and three.
2. tail -f /some/file
This tails a file: it’ll read what’s at the end and output it to your terminal. The -f parameter tells it to keep outputting as the file grows. I use this a lot when examining log files that are constantly being written to.
3. ctrl+z and bg
ctrl+z is the long lost brother of ctrl+c. It’s a signal that tells the process to suspend execution, while ctrl+c terminates it. Ctrl+z is useful if you execute a process but you want to get control of your shell; it’ll suspend the process and send it to the background. Think of ctrl+z like minimizing a window, except once it’s minimized it’s not doing anything anymore. If you want the process to stay in the background but continue running, that’s where bg (background) comes in: typing bg once a process has been suspended makes the process resume but still keeps it in the background. Source: Web Developers: 13 Command Line Tricks You Might Not Know
Even if you don’t use Linux but are into web development, seomoz.org is definitely a site worth checking out.