Weblog entry #4 for Nilshar

less with tail
Posted by Nilshar on Tue 15 Jul 2008 at 16:36
Tags: , , ,
You are using tail -f <file> to monitor a log file ? I was too.
You are using less to read and scroll up/down, search, etc.. a file ? I was too.
Today someone showed me that "less" is able to do tail (maybe most of you know already..).

use your usual :
less <file> to read the file, and if you want to use it as a tail, simply shift+F !
you want to stop the "tail mode" ? ctrl-C and you back to usual less. shift-F again to tail again etc..

 

Comments on this Entry

Posted by Steve (80.68.xx.xx) on Tue 15 Jul 2008 at 17:48
[ Send Message | View Steve's Scratchpad | View Weblogs ]

A good tip - I remember it has been mentioned before, along with a few other neat things, in our introduction to less.

Steve

[ Parent | Reply to this comment ]

Posted by ajt (195.112.xx.xx) on Tue 15 Jul 2008 at 22:36
[ Send Message | View Weblogs ]

The problem with tips like this is that I forget them...!

--
"It's Not Magic, It's Work"
Adam

[ Parent | Reply to this comment ]

Posted by Anonymous (59.178.xx.xx) on Wed 16 Jul 2008 at 08:19
> The problem with tips like this is that I forget them...!

The unix philosophy of "do one thing and do it well" springs to mind.

But given the power of today's machines, it hardly makes sense to remove such features. Good developers architect such things in a highly modular way anyhow.

PJ

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search