The Apache web server’s log format lends itself to processing with Unix command line tools, making it easy to generate traffic reports in real-time.

Managing back-ups or log files often involves deleting older versions of your archives, so that at any given time you are only storing a particular number of copies. Many scripts rely on the creation date of the files, deleting those files that are older than some set time–a day, a week, a month–but this is Read more…
There’s a thread on Reddit about remembering the correct order for the ln -s command. I’m heartened to learn that I’m not the only one who makes this mistake constantly. Several good mnemonics are discussed. You can remember it by comparing it to the copy command cp existing new ln -s existing new Or with Read more…
On a Linux machine, you can use the free command to display how much free memory you have. The -m option displays all values in megabytes $ free -m total used free shared buffers cached Mem: 2010 1418 591 0 61 1093 -/+ buffers/cache: 263 1746 Swap: 2047 0 2047 The Mem: line above reports Read more…
Secure shell supports a public key authentication mechanism that allows you to log in to a remote machine without providing a password, but it requires configuration. You generate a key pair, storing the private key on your workstation while copying the public key to a remote machine. The private key on your workstation uniquely identifies Read more…
There are two start-up scripts residing in your home directory that can be run by the bash shell at start-up: .bash_profile and .bashrc. What’s the difference? The .bash_profile script is only executed by login shells. A login shell is the initial shell created for a user when they login through the console or ssh. The Read more…
Are you tied of typing the entire hostname each time you SSH into a machine? $ ssh -l user01 machine1.example.com You can add an alias to your ~/.ssh/config file, setting both the username and hostname. Host mymachine HostName machine1.example.com User user01 Now, all you have to type is: $ ssh mymachine Related articles:
