On Fri, 2003-09-05 at 18:05, Fajar Priyanto wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi all,
> I run several tail commands to monitor several log files everyday.
> Instead of typing all the commands one by one on each terminal, is there any 
> way I can make this automatic or I can make some kind of shortcut for the 
> job?
> 
> Thanks a lot,
> Fajar.

Fajar,

  Read up on aliases in the bash man page.  For example I like to use
ssh with compression so I do 

alias ssh="ssh -C"

or for say doing a tail -f on /var/log/messages you could do

alias msg="tail -f /var/log/messages"

This all goes at the top, in your .bashrc file then when you su to root
(since you have to be root to tail the logfile) just typing msg would
give you the full command.  Just make sure your alias isn't also a
command (like doing an alias of ls to rm -Rf .... not fun, not good,
unless of course you do it to someone else *grin* 

James

> 
> - -- 
> - --
> This message was compose on a 100% GNU/Linux machine
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
> 
> iD4DBQE/WTLMUrYxG8KGMVERAtphAJ0bxuDR0gZmVwwjvFysVfDpIzhGNACYoJNO
> 8H3aLYBMOVzdipr8G1HFYQ==
> =KT/H
> -----END PGP SIGNATURE-----
> 
> 
> 
> ______________________________________________________________________
> Want to buy your Pack or Services from MandrakeSoft? 
> Go to http://www.mandrakestore.com


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to