[NMLUG] Effectively detaching 'less' from a pipe

Larry W. Wood lwwoody at comcast.net
Tue Feb 27 04:31:08 UTC 2007

On Feb 26, 07, at 8:27 PM, Kelly Jones wrote:
> I often run commands piped to 'less', to make sure the command is
> working OK by looking at the first few lines of output.

Don't use "less".  Use "head" instead:

		command | head -n N          (where N is the number of lines of the  
output you want to see)

HTH!           --  Woody

More information about the freebsd-questions mailing list