A Quick Summary of Unix View Commands

To display the last 50 lines of the file error.log:

tail -50 error.log

Keep /var/log/error.log open, displaying to the standard output anything appended to the file

tail -f /var/log/error.log

Frequently used variants often can be made into alias, for example:

alias vw='tail -100 /var/log/error.log | more'

Print a range of lines

awk '{if (NR > start_line_no && NR < end_line_no) {print} }' error.log

grep is a command line text search utility. The name is taken from the first letters in global / regular expression / print.

grep -n 'match' error.log