Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Search all folders with Find Desktop
The problem: Hit Command-F and search for "filename is 'Dock'". Nothing found ... What do you mean I don't have a Dock? Go into the top-level System -> Library -> CoreServices folder, and it's in there!

The solution: There is a "blacklist" of folders not to search. It is located in the top-level System -> Library -> Find directory, and it's called SkipFolders. Now, how to edit it? If you're not a user of vi or emacs or pico, run a copy of TextEdit as root instead. Go into Terminal and type sudo and a space. Go into TextEdit in the Finder, and control-click on it. Navigate to Contents -> MacOS, and drag the file TextEdit into the Terminal window. Type return. And then enter your admin password. TextEdit will open with root privileges in the Finder.

Now use this root TextEdit to open /System -> Library -> Find -> SkipFolders. Change the contents of the file to something like this:
Basically, folder names you won't ever have in your hard drive. Now save it, quit TextEdit and reboot. Do the same search again. Notice the Dock in the search results.

[robg adds: This hint was actually mentioned in passing in this much older hint, but I thought it was worth its own mention. I'd recommend backing up the SkipFolders file first, just in case. In the Terminal, just type these two commands (without the $ prompt, of course):
$ cd /System/Library/Find
$ sudo cp SkipFolders SkipFolders.bak
Supply your password when asked, and you'll now have a backup in the same location as the original.]

[robg udpate: Please see the comments; this hint makes some wrong statements regarding the Find function...]
  • Currently 1.67 / 5
  You rated: 1 / 5 (3 votes cast)

Search all folders with Find | 14 comments | Create New Account
Click here to return to the 'Search all folders with Find' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Search all folders with Find
Authored by: cudaboy_71 on Nov 24, '04 10:42:37AM

does this hint require a logout?

verified the /System/Library/Find/SkipFolders file is properly written, and in the directory.

but, the resultant 'find' does not locate any files in /System

i'll not be able to logout until later this afternoon. so, i was just wondering if i did something wrong, or if i need to reboot.

if it aint broke, break it!

[ Reply to This | # ]
Search all folders with Find
Authored by: John Derwent on Nov 24, '04 12:10:33PM

"Find" in the Finder does not automatically search the folder System. You can make it do so and also find invisible files as follows.
After clicking on Find, in the "Search in" box choose "Specific Places," and then "Add", and then navigate to and choose the folder System.
Next, in the "Search for items whose:" box, click on the + sign to add another search criterion. Set it to "Visibility" in the first box and "visible and invisible items" in the second box.


[ Reply to This | # ]
Search all folders with Find
Authored by: DanFrakes on Nov 24, '04 01:24:34PM

I could be wrong, but from the docs I've read, the SkipFolders file only applies to indexing of files. (Can anyone verify otherwise?)

As someone else noted, the easiest way to search for files in a system-level directory (System, etc., var) is to simply drag that folder into the Find dialog's "specific places" box before searching.

[ Reply to This | # ]
Search all folders with Find
Authored by: MichaelBuckley on Nov 24, '04 01:47:48PM

This is great; it's always bugged me that Find doesn't search certain folders. However, it's never affected me, so I never looked for a solution. A user-specific solution would be nice...

[ Reply to This | # ]
Authored by: mark hunte on Nov 24, '04 02:03:01PM

Rob. What blacklist???
My 'find' finds "dock" without going to the trouble of all that editing.
I think the real hint should be:
The Poster just needs to select search 'specified places' instead of 'home'.
Any disks,partitons, dmg mounts will be listed , just tick the ones you want to search. No problem???? -

There are othe search options but this I use most.


[ Reply to This | # ]
Authored by: rhowell on Nov 24, '04 02:51:48PM

Nope. Select the boot volume, and the System Folder won't be searched. Select "Everywhere", and not everywhere will be searched. The hint should be "How to search an entire disk when you specify an entire disk, or how to search everywhere when you specify everywhere".

[ Reply to This | # ]
WHAT BLACKLIST??? Oh that black list
Authored by: mark hunte on Nov 24, '04 08:55:33PM

You are so right.. I am so wrong

A very strange thing, I get in from work see this thread do a test, find 'dock' post , go out for a drink, come home not so sober and bright eyed, and see the light. Not sure if that is good or bad.

My 'find' was searching the previous system folder and so found 'dock' in there.


[ Reply to This | # ]
Search all folders with Find
Authored by: jnsimonhints on Nov 24, '04 05:41:05PM

You can always add /System or /Library using Add Specific Places in the Find window. Find will then locate core services items like the Dock.

[ Reply to This | # ]
Didn't work for me
Authored by: jigu on Nov 25, '04 06:25:27AM

Since I only cared about the folders Library and System, I deleted them from SkipFolders. Then I restarted the machine, searched for "Extensions.kextcache" (which resides in /System/Library) and I got zero hits.

Everybody: This hint seams to not work (unless I forgot something). It's not worth your time :-(

[ Reply to This | # ]
No, you're wrong
Authored by: fabrizio on Nov 25, '04 06:49:51AM

SkipFolders are those skipped by the indexing process for search by content.

[ Reply to This | # ]
better way to launch TextEdit from the terminal
Authored by: doce on Nov 25, '04 08:13:37PM

sudo open -a TextEdit

[ Reply to This | # ]
better way to launch TextEdit from the terminal
Authored by: fabrizio on Nov 26, '04 12:43:09PM

No. "sudo open" will launch application as standard user, not as root.

[ Reply to This | # ]
better way to launch TextEdit from the terminal
Authored by: ClassicUser on Nov 26, '04 11:59:03PM
Actually, no - oddly enough, "sudo" will still launch the app as your standard interactive user, not as root.

A few workarounds:
  1. Use BBEdit (see ). EXCELLENT text editor, which is smart enough to ask for authentication within the app, when a limited-access file is edited.
  2. Launch the GUI editor of your choice - including TextEdit - using Pseudo (see ). An absolutely must-have application, which allows any GUI application to be launched "as root".
Of course, all the standard caveats apply: You can really screw things up if you don't know what you're doing, yadda yadda yadda...

[ Reply to This | # ]
better way to launch TextEdit from the terminal
Authored by: vonleigh on Nov 27, '04 05:24:23AM

It doesn't seem terribly odd when you think about it. Sudo performs the command following it with escalated privileges, therefore what's getting run as sudo is the open command.

However the open command doesn't really care if it's root or not, so it just goes about it's business opening the application.

[ Reply to This | # ]