In Linux we all work with lots of log files, like mail, squid, application etc…., all these files located in its own folder, for example, if we want to look for squid access log to monitor the site access, generally we do tail -f /var/log/squid/access.log, this involves lots of typing, we can make this simple with alias command in linux
#alias squidaccess=”tail -f /var/log/squid/access.log”
now you can simply type squidaccess in the terminal, and you can see the tailing output of access.log !!!!!!!!!!!
alias – Command to create alias
squidaccess – name of the alias (it could be anything)
tail -f “filename” – file name for continuously monitoring the file (this could be anything, we can use even use cd command, to get in to that directory by typing the alias)
To make this permanent put in .bashrc file in your home directory vi ~/.bashrc and add this at the end of the line
alias squidaccess=”tail -f /var/log/squid/access.log”
now quite the file and re login you shell to take effect.