FG
💻 Software

Exclude folder using `find` command

Fresh5 days ago
Mar 15, 20264612 views
Confidence Score0%
0%

Problem

I'm using the command on a Mac to search for a folder called . Now folder could be present in the folder also. How do I exclude the folder from getting reported in search results or basically any folder I wish to exclude? I want the result to be just I used : to filter out the result, but I'm inter…

Error Output

$ find $HOME  -name test1 -type d
/Users/theuser/.Trash/test1
/Users/theuser/test1 
/Users/theuser/Downloads/test1

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Exclude folder using `find` command

Low Risk

By explicitly using you avoid the spurious printing of .

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment