Using redirection on the UNIX command line.

Using redirection on the command line is very easy to do. The main strength of the UNIX command line is that you may output data from one command-line application to another. Here is one example. ls -hula | lessls -hula | less This is using the pipe character to pipe…

Read More

A quick look at redirection in the bash shell.

The bash shell allows the user to redirect output from one application to another or to a file. This is very useful when you are building a one liner script to perform a certain action. Here is a simple redirection. ls > ls.outls > ls.out This redirects the output of…

Read More

Linux commands that prove useful for your day to day workflow.

The UNIX tail command is very useful for viewing the last number of lines of a logfile. As in this example. Showing the last 10 lines in the file /var/log/syslog. |{~}-{Thu Feb 16 21:36:44} -{john@deep-thought } $ tail -n 10 /var/log/syslog Feb 16 21:31:01 deep-thought cron[1480]: (*system*anacron) WRONG FILE OWNER…

Read More