[NCLUG] Find, grep and other pointy instruments

Michael Dwyer mdwyer at sixthdimension.com
Fri Apr 20 16:18:50 MDT 2001


I'm looking for a way to do this:

  find / -print | grep "everything unless it is a directory which
includes a specific file"

Seeing as how regexp is a little too advanced to understand English,
does anyone have any tools that do this?  I could probably write
something, but then I'd have to actually *think* and even *code*... and
I'm hoping someone else has already seen this.

For what it is worth, I expect it would be found in backup scripts.
That's what I hope to use it for.  I need a way to mark directories so
I'm not backing up things that, well, don't need it.  I can place
directo --

Hmmm...

  find / -print | grep DO-NOT-BACKUP | sed -e 's/DO-NOT-BACKUP//' >
excludelist

This might work.  Anyone have any other ideas or have seen this done
somehow?




More information about the NCLUG mailing list