[Lug-Nuts] one liner for viewing text files with less

From: Brian E. Lavender (brian@brie.com)
Date: Sat Sep 25 1999 - 13:37:23 PDT


I remember before I was asking how to view text files and see the name of
them with less. Here is a one liner I came up with. I suppose it's just
another use of the all powerful ubiquitous find. If you wish to skip
contents of a file, you just hit 'q' and it skips to the next file.

$ find . -name \*.txt -print -exec less {} \;

The '.' means start from the current working directory and proceed
from there.

brian

-- 
Brian Lavender
http://www.brie.com/brian/



This archive was generated by hypermail 2b29 : Fri Feb 25 2000 - 14:29:07 PST