FG

How can I exclude a directory when using find

Fresh3 days ago
Mar 15, 20268922 views
Confidence Score0%
0%

Problem

I'm trying to use the find command in Unix and I know how to use the basics of it. For example, I have four folders, A, B, C, and D. Under each folder I have a file called . To look in all folders, I would do: . Great! But now what if I do not want to look at folder D? Can I try something like: ? I…

Error Output

hi.dat

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How can I exclude a directory when using find

Low Risk

That would be — but there's a slight trick to it: means "don't look any further on this path", so you need another branch for directories other than . ( means "or".) To skip other paths as well:

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment