command to display all text files inside a directory

Mike McCarty Mike.McCarty at sbcglobal.net
Mon Jun 26 13:29:30 UTC 2006


Steven W. Orr wrote:
> On Monday, Jun 26th 2006 at 07:42 -0500, quoth David Gomez:
> 
> =>On Mon, 2006-06-26 at 15:49 +0530, Kaushal Shriyan wrote: > Hi ALL > > 
> =>which command is used to display all text files inside a particular 
> =>directory >
> =>
> =>That depends on what do you mean by 'text files'
> =>
> =>I would use something like this.
> =>
> =>find <start_directory> -type f -exec file {} \| grep
> =><some_strings_matching_text_files> \; -print
> 
> By my BEARD I wish people would stop using find -exec.
> 
> WHY in the Wide Wide World of Sports would anyone start a seperate process 
> for each file encountered when they could do it all in one process.
> 
> PLEASE read the xargs manpage. Learn it. Love it.

WHY do you care how many CPU cycles I use on my own machine?

If you think this fellow might care how long it takes for the command
to execute, why not offer up a little help rather than a RANT?

Mike
-- 
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!




More information about the fedora-list mailing list