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

Re: Finding files containing 'string'

Paul Howarth wrote:
Anne Wilson wrote:
I need to list all files that refer to my network-name, but I can't work out a command to do it. I thought I would have to cat everything, piping through grep 'string', but that doesn't search recursively, the help-file doesn't show a recursive flag, and I'm not sure that it would actually give me the filenames anyway.

For a multitude of different ways of doing this, check out the thread from last month where the same question was asked:


My personal favourite solution for this problem:

$ grep -i -r -l 'string' /place/to.start/searching

This would have been much easier to find in the archives if the OP from last month had used a sensible Subject: and hadn't hijacked another thread of course.

That works well on files with spaces and other special characters
just doesn't work well with links that aren't there. ;-) Thanks
that fixed the spaces problem I was having and it found some broken
links I didn't know I have (really need to run the FS tools).

Linux Home Automation         Neil Cherry       ncherry linuxha com
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
http://home.comcast.net/~ncherry/               Backup site

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