Oracle Solaris System Administration (MOSC)

MOSC Banner

How to exclude a file system subtree from find?

edited Aug 30, 2011 6:42AM in Oracle Solaris System Administration (MOSC) 5 commentsAnswered ✓
Hello,
Please, do you know how to make find exclude a file system subtree from its results?
I want to exclude a .snapshot subdirectory and all its contents but I don't know if it's possible to craft such an expression.
A crude solution could be to pipe the results through grep -v '.snapshot' but it may be not a general solution if more than one subtree share the same subdirectory name and you want just one of them.

Thanks in advance,
Carlos.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center