[SlugBug] find

Chris J cej at nightwolf.org.uk
Sat Sep 6 01:22:23 BST 2003


And Lo! The Great Prophet Beneath uttered these words of wisdom:
> 
> Basically, i do the usual 'find / -exec grep -sH "some string" {} \;',
> to search the entire filesystem... usually this would work fine. Lately,
> it hangs and in the process list, it seems to be hung on 'grep -sH some
> string /dev/<device>', the device being one of those that if you were to
>
> So, how to i get it to skip over /dev by default, and why the heck do
> you think it has changed?

Er, there should be a way, but I'm too lazy to read "man find" atm. However,
try this:

	find / -type f -exec grep -sH <etc etc etc>

i.e., add the -type f predicate, then find will only return files that are
proper files, rather than directories, sockets, links, and character/block
devices etc.

Why it's changed? Running as root and not $USER ? Can't think of any other
reason offhand.

Chris...

-- 
\ Chris Johnson           \ NP: Classic Experience - 05. Beethoven - 'Empero
 \ cej at nightwolf.org.uk    ~-----,  r' Concerto 
  \ http://cej.nightwolf.org.uk/  ~-----------------------------------, 
   \ Redclaw chat - http://redclaw.org.uk - telnet redclaw.org.uk 2000 \____



More information about the SlugBug mailing list