The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   Applications (http://hintsforums.macworld.com/forumdisplay.php?f=5)
-   -   Need spotlight to index /System and /Library (http://hintsforums.macworld.com/showthread.php?t=81483)

leftydog1961 11-17-2007 09:16 AM

Need spotlight to index /System and /Library
 
Can anyone provide a solution to enable spotlight to do all inclusive searches of the hard drive including library and system files. I really need this functionality without using a third party solution. Thanx

ecbtln 11-17-2007 09:32 AM

im still stuck with having it appear in the default spotlight search but you can create a search and add it to your sidebar that contains all system files as well as all invisible files.

leftydog1961 11-17-2007 11:33 AM

Spotlight in Leopard
 
Yes, I have the sidebar search set up. That is not what I want, I want to change the behavior of spotlight so that everything is indexed and shows up. Does someone have a tool, or a plist that can be modified to include everything.

roncross@cox.net 11-17-2007 04:46 PM

Quote:

Originally Posted by leftydog1961 (Post 426018)
I really need this functionality without using a third party solution. Thanx

Even without this functionality, you'll be fine. Spotlight is mainly user specifics so that you are not going into other users account particularly if they are owned by someone else such as root and wheel.



You can access the /System/Library/ directory using the terminal but you must become a root user. Once you are root, use the following command.

mdfind -onlyin /System/Library/ what_i_am_looking_for

see the man page for more details.

leftydog1961 11-17-2007 08:01 PM

Spotlight in Leopard
 
Thanks for the kludge, but it's still not what I want. I am not interested in using Terminal, purchasing a third party solution, or finding a workaround. I ONLY want to get Spotlight indexing all of the files.

Can anyone offer a solution that just fixes Spotlight to simply see all files?

roncross@cox.net 11-17-2007 09:05 PM

Quote:

Originally Posted by leftydog1961 (Post 426184)
I ONLY want to get Spotlight indexing all of the files.

Can anyone offer a solution that just fixes Spotlight to simply see all files?

Spotlight already indexs all your files even though you can't always get to them. That's what the terminal is for when you need to do things that you may not be able to do with the gui.

May I ask, what are you really trying to achieve? Will indexing all the files help with you something else?

You may be able to use automator to help you. But there may other suggestions if you give the motivation for why you want spotlight to return queries in /System/Library. There may be another way to achieve your end goal if it's other than just querying the /System/Library/ in Spotlight.

J Christopher 11-17-2007 09:20 PM

Quote:

Originally Posted by roncross@cox.net (Post 426200)
Spotlight already indexs all your files even though you can't always get to them. That's what the terminal is for when you need to do things that you may not be able to do with the gui.

May I ask, what are you really trying to achieve? Will indexing all the files help with you something else?

You may be able to use automator to help you. But there may other suggestions if you give the motivation for why you want spotlight to return queries in /System/Library. There may be another way to achieve your end goal if it's other than just querying the /System/Library/ in Spotlight.

I'm not sure about leftydog, but the only time I typically need Spotlight is when I'm looking for a specific .plist file, or a system file. My home folder stays very well organized, such that searching is rarely necessary.

It would be great to be able to find files I'm looking for in Spotlight by just clicking on the icon and typing in the search terms. Isn't Spotlight there to help me find stuff that I otherwise can't find?

Example: I was trying to find the location of Finder.app a few days ago so that I could assign it to all Spaces in the Spaces preference pane. Spotlight was useless (as was cmd-clicking or right clicking the Dock icon). It should have been the top hit.

leftydog1961 11-18-2007 12:02 AM

spotlight in Leopard
 
Some more detail. I am a Systems Engineer on the Microsoft platform. Coming from that realm, it is important to be able to find, and modify system files to accomplish various goals. For example, recently I had a problem with retrospect on 10.4 on my PowerMAC G5. I needed to disable retrorun which loads with boot. Not knowing where the startup items are located in Tiger caused me to spend quite a bit of time trying to find a folder and files which i needed to delete to reinstall the product for troubleshooting. fortunately, on 10.4 I was able to use spotlight to discover where the startup items were kept by knowing what the file was called that loaded at boot.
Now in leopard, I cannot find plist files, etc since spotlight has become picky.
I want complete control of the system so that I can make changes and do not to be protected by Apple from damaging files that may hose myself. I have taken precautions of backing up my system and am not bothered by restoring it should I screw something up. But I do want the functionality of typing any file or folder I choose into the search window and knowing where it is located.
I did not mean to invoke a discussion on why I need this functionality, or argue its necessity. I merely want the ability to search for whatever I want, when I want it (like the new windows search in vista which does not protect me from discovering what is in the \system32\ folder)

Can anyone shed some light on how I might accomplish this goal? There must be a way to add includes into some plist file, or drag the ~Library folder into some spotlight gui which will add this ability.
Has anyone figured out how to expand the reporting function of spotlight to include these hidden areas?

Thanx,

hayne 11-18-2007 01:45 AM

Quote:

Originally Posted by leftydog1961 (Post 426221)
or drag the ~Library folder

You keep referring to ~Library (I fixed this in your original thread title). This is incorrect usage. The ~ refers to your home folder. The folder you are asking about is the Library folder at the top level of the disk and hence is called /Library since / designates the top folder of the disk.

It is important to use the correct terminology, especially since there is a Library folder under your home folder and that Library folder is ~/Library

Las_Vegas 11-18-2007 01:59 AM

You're asking way more out of Spotlight than is intended. Spotlight's purpose is to rapidly locate documents based on name and/or content. If you want/need to do thorough searches for specific files or file types, you need to learn a little UNIX and take advantage of the powerful features of Unix.

Using Spotlight for that is like using reading glasses to examine cell growth.

leftydog1961 11-18-2007 02:28 AM

spotlight in Leopard
 
I stand corrected on usage of ~Library. I also accede to Las_Vegas about learning UNIX to perform more powerful tasks. However, the Mac GUI is the reason I use Leopard, and since this task was possible before in Tiger, it should be possible to do the same thing in Leopard.

What I find interesting is the quote "Using Spotlight for that is like using reading glasses to examine cell growth."

Learning UNIX to accomplish what I want, would be equivalent to loading DOS on my Dual Core Intel system to perform a dir *.plist /s

The simple fact remains that there has to be a way to tweak spotlight to report all that it knows without running arcane command line switches.
:(

Las_Vegas 11-18-2007 02:46 AM

Not at all... Although, you could never accomplish a 'dir *.plist /s' in Windows without command line. You can open any folder in Mac OS X and type '.plist' into the upper-right box and find every instance of a plist file in that folder.

There are three places where you'll find most plist files in OS X. /Library/Preferences, ~/Library/Preferences and many application or other package's Contents/Resources folder within the package. Only a UNIX search would find the later.

trevor 11-18-2007 03:11 AM

Quote:

The simple fact remains that there has to be a way to tweak spotlight to report all that it knows without running arcane command line switches.
If I'm understanding what you want, this is quite easy, with no trips to the command-line necessary.

Hit Command-F in the Finder to get a search window. Click the "Kind" popup, and set it to "Other". In the sheet that appears, type "System" in the search field. Only one result will show, "System Files: Include system files, preference files, plug-ins, etc...". Click the "In Menu" checkbox to the right of that. Click OK.

Now, you will have "System Files" in the popup search types menu (or whatever that is called), and you can set it to "Include".

Trevor

leftydog1961 11-18-2007 03:35 PM

spotlight in Leopard
 
Thanks Trevor, but I have that saved to a sidebar already. What I really want is just to simply type in a file name, like something.plist, or retrorun and have spotlight find the file and return the path, just like in Tiger.

roncross@cox.net 11-18-2007 05:18 PM

Ok, it sounds like this use to work in Tiger and since you upgraded to Leopard, it no longer works. If this is the case, you may want to try and reindex the drive.

Read this hint to see how to do it.

http://www.macosxhints.com/article.p...ex%2Bspotlight

leftydog1961 11-19-2007 09:58 PM

spotlight in Leopard
 
reindexing has been done. the short and long of this, is that some file needs to be modified, or permissions changed somewhere to allow Spotlight to report what it has apparently indexed. It appears that this has been done deliberately to prevent users (or more correctly, the average joe) from snorking his system by deleting an important file. Clearly, apple feels that people need not bother themselves with looking for files "accidentally" through spotlight where they may discover the inner workings as nothing more than a command shell with a gui slapped on it. (Windows?)

does anyone with knowledge of spotlight know how to hack it to show all files when doing a search.

Please no workarounds, no third party tools, no command line terminal windows, nothing but getting spotlight to simply return all the plist files in Library will be acceptable

Thanks for any assistance with this chore.

roncross@cox.net 11-20-2007 07:28 PM

Let me make sure that I understand that these are all the files in the ~/Library and not the /Library directory.

Spotlight should be able to search for plist files inside ~/Library but not /Library. If you are looking to do this inside /Library, then I am not sure how this is done under the criteria that you have mentioned.

Hal Itosis 11-21-2007 12:12 AM

Quote:

Originally Posted by leftydog1961 (Post 426354)
Thanks Trevor, but I have that saved to a sidebar already. What I really want is just to simply type in a file name, like something.plist, or retrorun and have spotlight find the file and return the path, just like in Tiger.

leftydog1961,

Do you know what a 'Smart Folder' is... and how to create one?

Because... it doesn't sound like you do.

trevor gave you the "include system files" selector in his post.

Just combine that concept with a Smart Folder (saved search) and it's all done.

NeXT.

-HI-

leftydog1961 11-21-2007 10:25 PM

spotlight in Leopard
 
:(
Alas, another kludge.

Sorry. Do not mean to be obtuse. However, multiple people have sent in methods to accomplish this, but all have missed my point. I do NOT want to do any of these kludges. I simply want to be able to get a complete report out of spotlight on any file I type into the search box. I want to know its location, how big it is, when it was created, modified, etc

Has anyone used Windows Search in Vista? That would be a good idea of what I would want Spotlight to do. I can't imagine that Windows can do this with ease and Leopard requires various different "schemes" to accomplish a simple task.

All I want to do is get spotlight to find anything that exists on the hard drive no matter where it is.

Is this not possible as described? How can Spotlight in Tiger do this and Leopard won't.

leftydog1961 11-21-2007 10:33 PM

Quote:

Originally Posted by Las Vegas
Although, you could never accomplish a 'dir *.plist /s' in Windows without command line. You can open any folder in Mac OS X and type '.plist' into the upper-right box and find every instance of a plist file in that folder.

Actually, Windows could always search for any file using explorer, as long as you took the "h" hidden attribute off. Going into every folder and searching for '.plist" is not an option.

This is a good example of what spotlight is doing.
In Windows, you will not see the boot.ini file at the root of C:\ or NTLDR, for example. After turning off "hide protected files" all of these files are visible in the GUI.

Is there something similar in Leopard, where I can tell Spotlight to show me all files?

Las_Vegas 11-22-2007 12:07 AM

Yes! That sounds great! Make it easy for a potential virus to find and modify anything! Sorry. I'm very happy with my limitations that aren't present in Vista. You ask for help about how to accomplish something, and than complain that the solutions are a "kludge." In other words, you don't want a solution, you want Apple to revise it for you so you don't have to do anything. Why not just switch to Vista and get everything you're asking for?

J Christopher 11-22-2007 04:29 AM

Quote:

Originally Posted by Las_Vegas (Post 427488)
Yes! That sounds great! Make it easy for a potential virus to find and modify anything! Sorry. I'm very happy with my limitations that aren't present in Vista. You ask for help about how to accomplish something, and than complain that the solutions are a "kludge." In other words, you don't want a solution, you want Apple to revise it for you so you don't have to do anything. Why not just switch to Vista and get everything you're asking for?

Maybe I'm missing something, but I fail to see how allowing to Spotlight to locate files that I don't know the location of (hence searching for them) is a security risk. Using my previous example, why should I not be able to locate Finder.app with Spotlight? Is it unreasonable to expect that a user will need to locate a specific .plist file from time to time?

What good is a search app if I can only look for stuff for which I already know the location? If a file is not hidden from Finder, why should it be hidden from Spotlight? That doesn't make any sense.

It does appear that Leopard, as much as I love it, has unnecessarily crippled Spotlight.

Las_Vegas 11-22-2007 11:14 AM

There is no reason you shouldn't be able to do what you want. It's not going to just happen though. You can use the "kludges" that have been suggested, or just accept your fate. The only other alternatives, if they're there, would require more "kludges." There isn't some magic wave of the hand that's just going to change it.

I must apologize for my outburst previously. It was late, and I felt offended that all the help offered was rejected and dismissed out of hand. If you do find a solution that doesn't require a kludge, I do hope that you're appreciative enough of this site's work on your account to publish it here.

Hal Itosis 11-22-2007 12:02 PM

Once again, it's a case of people not using the right tool for the job.
Spotlight is mainly intended to help folks to find *their own* sh!+.

If you want to go diving inside packages, and ferreting thru
every inch of the filesystem, then get File Buddy... or learn
how to use the UNIX command line for heaven's sake.

Habb3tz 11-26-2007 07:23 PM

Seriously people, this is a post asking how to obtain this functionality from within spotlight. Telling someone that they should be using the command line or other method's is not useful at all. If you feel this is not the intended use of Spotlight, fine, but keep it to yourself, rather than offering very unhelpful answers, so refrain from posting unless you have a solution to the problem.

Personally, I would like this functionality. I don't see why, if I want to find a .plist file or a corservices app quickly, I shouldn't be able to quickly find it using spotlight! Perhaps it shouldn't be the default behaviour, but I see no reason why one should have to delve into the command line to achieve something that could be done quickly with spotlight.

Hal Itosis 11-26-2007 08:04 PM

Quote:

Originally Posted by Habb3tz (Post 428820)
Personally, I would like this functionality. I don't see why, if I want to find a .plist file or a corservices app quickly, I shouldn't be able to quickly find it using spotlight!

I just went to the System folder, typed command-F
clicked on "System", clicked on File Name, and then
typed ".plist".

The result has 1,117 hits. [So we've got the "functionality".]

That was done *without* the 'System files - include' hint on the previous page.

Did you even try it yet?

roncross@cox.net 11-26-2007 08:09 PM

Please keep in mind that mdutil is the underpinning of Spotlight.

Please read the man page for mdutil. One of the very first line states:

mdutil -- manage the metadata stores used by Spotlight

So there is a way to do it but the author of the post is frankly being stubborn.

Without the terminal you can't access the more sensitive files, there is probably no way to do it using the GUI since it is user base. So if mdutil is a kludge than Spotlight itself is a kludge since it lacks the functionality and power of the command line search.

Habb3tz 11-26-2007 09:29 PM

Quote:

Originally Posted by Hal Itosis (Post 428832)
I just went to the System folder, typed command-F
clicked on "System", clicked on File Name, and then
typed ".plist".

The result has 1,117 hits. [So we've got the "functionality".]

That was done *without* the 'System files - include' hint on the previous page.

Did you even try it yet?

Yes that is true, but, i would much rather that we could figure a way to make system files included by default, so .plist files etc. could be found quickly from the spotlight menu icon. I'm impressed by the speed of spotlight in leopard, and I like to be able to find things quickly. Opening a finder winder, clicking the system folder, running a search, then clicking results from "system", is not what i call quickly, not to mention it requires opening windows etc. that I would rather not have to do.

nathangsm 05-21-2009 06:22 PM

Quote:

Originally Posted by leftydog1961 (Post 426354)
Thanks Trevor, but I have that saved to a sidebar already. What I really want is just to simply type in a file name, like something.plist, or retrorun and have spotlight find the file and return the path, just like in Tiger.

So, I'm well over a year late to the discussion, but that's because I just bought a new Mac, am using Leopard for the first time, and have been repeatedly frustrated that Spotlight cannot do WHAT IT DID BEFORE.

NO, I don't want to have to open a Finder window, navigate to the proper folder, and then do a search. I want to be able to just type the hotkey, enter my search string into Spotlight, and have the file(s) I'm looking for appear.

THIS IS WHAT SPOTLIGHT USED TO DO, and while that may not be how it functions any more, expecting to have this capability ISN'T BEING UNREASONABLE.

Just like leftydog, I DON'T want to open up the Terminal, or even KNOW what commands I'd need to enter to search via that method; I DON'T want to have to have saved searches, smart folders, or any OTHER method.

Reading some of the "helpful" replies in this thread, quite frankly, made me feel just a little violent. Some of you people really need to get your heads pulled out from the nether regions that they appear to be lodged in.

benwiggy 12-14-2010 08:22 AM

I came across this thread when looking for a way to index a folder (inside /private/var).
I'm surprised that no one has mentioned mdimport.

You can add the contents of a folder to the SpotLight index with:
mdimport /folder

However, the point remains that indexing the entire System and Library is of limited value and may slow things down a bit. Spotlight also has a max size for the index, apparently.

The Apple philosophy is, I imagine, that you shouldn't need to search for stuff in the System or Library folder. Firstly, they are well-organised and well-labelled; and secondly, if you're going to be tinkering with stuff there, you should really know a few Unix commands or so.

Most importantly, you may find that search results become filled with extra noise if System files are included, which may obscure the file you're looking for.


All times are GMT -5. The time now is 10:33 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.