[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] Re: Ordinary linux question



> I know a word in a file, but don't know the filename.
> EX: i need to find    sbin    WITHIN a html file.
> How ?

Similar to what someone else said, you could do

	find /home/sites -name "*.html" -exec grep -H sbin {} \;

(the -H prints the filename when a match is found)

And if you wanted to plow through the whole server, just change the starting 
directory for the find command to /

	find / -name "*.html" -exec grep -H sbin {} \;