find / grep command without searching mounted shares
Problem
When I used the find command, I almost always need to search the local drives. But, I almost always have super large network shares mounted and these are included in the search. Is there an easy way to exclude those in the find command, grep and other similar commands? Example: find / -name .vimrc
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Fix for: find / grep command without searching mounted shares
If you're using GNU find (as is used on most Linux systems), you'll want to use : OS X/MacOS provides the pseudo-fstype. This not in GNU find (fstypes recognized by GNU find). Use the option to find on MacOS: If you want to exclude only specific paths, you could use : Update: MacOS Catalina (Jan 2022) I'm two major releases behind the latest MacOS, but some has changed. First, MacOS now supports the option. The man page for says "The same thing as -xdev, for GNU find compatibility." Second, sti…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix