On Sat, 19 Feb 2005, Khepri wrote:
>
>
> Eben King wrote:
>
>
> > For future reference, I did this:
> >
> > find /usr/X11R6/ -type f | xargs grep -l Logitech
> >
> > and picked the most likely-looking candidate.
>
> Hmmm...
>
> That's...find...in this directory...a file...with
> these arguments...grep? I don't know that one yet
> but i've seen it...searches inside
> files?...-l..the whole file...for string 'Logitech'...
>
> Something like that?
"find /usr/X11R6 -type f" finds all files under /usr/X11R6 and prints their
names (if there had been any files with " ", ', &, and so on in their names,
I'd have had to use a different method, but there weren't). "xargs" takes a
list (of indefinite length) from standard input and builds a maximum-length
command out of it, using the rest of its line as the beginning of the
command. So what gets executed is "grep -l Logitech <some of the files in
/usr/X11R6>". The "-l" option to "grep" makes it print the names only (as
opposed to name + match) of matching files.
--
-eben ebQenW1@EtaRmpTabYayU.rIr.OcoPm home.tampabay.rr.com/hactar
A: Because it looks dumb and is hard to read.
Q: Why is top-posting wrong? -- from lots42@xxx.com
http://www.fscked.co.uk/writing/top-posting-cuss.html
This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:06:48 EDT