Re: Finding files which does not contain a specific string
From: all mail refused (elvis_at_notatla.org.uk)
Date: 06/18/04
- Next message: Brian Mengel: "Solaris RAID failover problems"
- Previous message: Peter J. Acklam: "Re: Finding files which does not contain a specific string"
- In reply to: Peter J. Acklam: "Re: Finding files which does not contain a specific string"
- Next in thread: Scott Howard: "Re: Finding files which does not contain a specific string"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 18 Jun 2004 17:03:42 GMT
In article <3c4shlto.fsf@online.no>, Peter J. Acklam wrote:
>First I'd build a list of all the files
> find DIR -type f | sort > all.tmp
>
>Then I'd build a list of all files which *do* contain "string"
> find DIR -type f -exec grep -q 'string' {} \; -a -print | \
> sort > with-matches.tmp
>
>Then I'd compare the two files and print those without matches
> comm -13 matches.tmp all.tmp
>
>Maybe not the most efficient, but it works.
find2perl, slurp mode
-- Elvis Notargiacomo master AT barefaced DOT cheek http://www.notatla.org.uk/goen/
- Next message: Brian Mengel: "Solaris RAID failover problems"
- Previous message: Peter J. Acklam: "Re: Finding files which does not contain a specific string"
- In reply to: Peter J. Acklam: "Re: Finding files which does not contain a specific string"
- Next in thread: Scott Howard: "Re: Finding files which does not contain a specific string"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|