Saturday, May 2, 2009

View /var/adm/messages in order

Usually the messages file in Solaris would be rotated and appended with a number in the end. I usually use this command to view the files in order.

The command I use is this:

#ls -1A /var/adm/mess* | sort -r | xargs cat | less

With this command all message files can be viewed at once, in the correct chronological order.

Readers who read this page, also read:




Bookmark and Share My Zimbio http://www.wikio.com

0 comments: