14 Replies Latest reply: May 10, 2013 10:46 PM by BDAqua
paulpen Level 1 Level 1 (30 points)

Okay, i just searched one of my hard drives for pdf files, and search returns 0 files.

 

HOW can this be!? I would use profanity here because it's plainly warranted, but Apple doesn't like that. I think from now on, i'll use the term "OS X" as a substitute for profanity.

 

So, I am looking at several pdf files in an OS X folder on this OSX drive, and i know there are more.

 

So what the OS X is going on? Thanks.


PowerMac, Mac OS X (10.4.11), G4; G5; Dual-Core iMac.
  • 1. Re: WHAT now with OSX search function?
    Ramón G Castañeda Level 4 Level 4 (1,445 points)

    Spotblight is such a useless and intrusive piece of cr@p that I have it permanently disabled on my Macs since it came on the scene.  Of course, the Search function in the Finder uses Spotblight.

     

    I use Easy Find (free) and Find Any File (small shareware fee but worth it—yes, I've paid) instead.

  • 2. Re: WHAT now with OSX search function?
    seventy one Level 6 Level 6 (8,990 points)

    Yes.   East Find and Find any file are vastly superior to Spotlight.   But having said that, it is probably better not to have Spotlight or any Apple facility totally disabled unless it is interfering with other facilities. 

  • 3. Re: WHAT now with OSX search function?
    Ramón G Castañeda Level 4 Level 4 (1,445 points)

    seventy one wrote:

     

    …it is probably better not to have Spotlight or any Apple facility totally disabled unless it is interfering with other facilities. 

     

    But that is precisely my point!  Spotblight is so intrusive that its pervasive indexing is continually interfering with just about everything, to say nothing about the unnecessary, pointless, continuous suggestions it brings up when you're typing in the search field.

     

    Spotblight is the epitome of inefficiency.  The improvements in overall OS performance when Spotblight is permanently disabled are immediately and eminently observable.  It's like applying a hardware upgrade to each of my systems.

     

    Additionally, I disagree with the notion of not disabling "other Apple facilities".  The Dashboard is also permanently disabled in all my Macs.

     

    On the other hand, the disadvantages of disabling those Apple "facilities" are zilch, zero.

     

    Not everybody needs everything Apple gives you as part of the OS, of course.  I have no need or use for things like Garage Band, but those types of applications are harmless and not a drag on the system if you just don't launch them at all.

  • 4. Re: WHAT now with OSX search function?
    Ramón G Castañeda Level 4 Level 4 (1,445 points)

    paulpen wrote:

     

    …So, I am looking at several pdf files in an OS X folder on this OSX drive, and i know there are more.

     

    So what the OS X is going on?…

     

    Apple has declared certain types of files and whole directories off-limits to Spotblight.  That's what makes it utterly useless for me, apart from intrusiveness.

  • 5. Re: WHAT now with OSX search function?
    rccharles Level 5 Level 5 (5,370 points)

    On the other hand, the disadvantages of disabling those Apple "facilities" are zilch, zero.

     

    At least in Tiger, disabling SpotLight renders the find in Mail non-functional.  For the benefit of mail search, I leave spotlight on.

     

    Robert

  • 6. Re: WHAT now with OSX search function?
    seventy one Level 6 Level 6 (8,990 points)

    Agreed.

  • 7. Re: WHAT now with OSX search function?
    Ramón G Castañeda Level 4 Level 4 (1,445 points)

    rccharles wrote:

     

    On the other hand, the disadvantages of disabling those Apple "facilities" are zilch, zero.

     

    At least in Tiger, disabling SpotLight renders the find in Mail non-functional.  For the benefit of mail search, I leave spotlight on…

     

    Ah! Since I have never even once launched Apple's Mail application, there's nothing in there for me to search. 

     

    Thank you for mentioning this, though, for the benefit of those who do use Apple's Mail.

  • 8. Re: WHAT now with OSX search function?
    BDAqua Level 10 Level 10 (116,480 points)

    paulpen also needs to add the byline to his posts...

     

    Do Not recommend any 3rd party apps to overcome OSXs shortcomings.

     

    "It just works", which we all know isn't so from the milions of posts here.. well, we're all lost trying to help pp.

  • 9. Re: WHAT now with OSX search function?
    paulpen Level 1 Level 1 (30 points)

    Thanks for all the responses. I did have this particular drive in the "private" section of spotlight, i.e. spotlight disabled. I didn't realize you still couldn't even do a simple file search. I just don't want my drives being *indexed* all the time. That's because i realized it was indexing them *while* i was doing other things, e.g. testing, copying, antivirus, defragmenting, restoring, etc. Obviously, you don't want the OS indexing the drive at the same time as it's doing other intensive things!

     

    I'll try one of those 3rd party search utilities. It's just so pathetic that "the world's most advanced OS" (i.e. oSx) can't even search for files on a hard drive when OS9 did it fine. RAM disks are another thing that are so poorly implemented in OSX that it borders on criminally negligent.

  • 10. Re: WHAT now with OSX search function?
    BDAqua Level 10 Level 10 (116,480 points)

    I think you may be pleased using a 3rd party search tool, it sort of puts you in command of your computer again, & both the ones mentioned have some methods not easily used in the OS.

  • 11. Re: WHAT now with OSX search function?
    rccharles Level 5 Level 5 (5,370 points)

    You should use spotlight to stop indexing an an hd.  Spotlight puts a file on the hd that says do not index.   I wrote this up awhile ago.

     

    In an this post I will describe how to perform a classic Mac OS search. You may perform the search with or without the spotlight database. This search falls under the smart folder implementation introduced with Tiger.  I have done all my testing with Mac OS 10.4.11. I assume this will work with any version of Tiger or Leopard. 

     

     

    The results will be slightly different with a spotlight database on the partition and without a database on the partition. With a database, you will not see Unix hidden files. You may be able to use all of the spotlight special find features. I did not test much with the spotlight special fields. Without a database, using the special features nulls out the search and the "Search for" field seems to give the same result as using the name field.

     

     

    This search technique was obscured by all the hoopla over spotlight. Authors of Tiger books avoided mentioning the Classic search interface. When I looked in Leopard books I noticed some authors put back information on the Classic search interface.

     

     

    How do you get to this interface?

     

     

    Perform the Classic Mac OS search with a Spotlight database.

     

     

    Click on the desktop to access the Finder.
    click on File then click on find.

     

    Pick what folder you wished to search.  Click on Others... to select a folder. Click on the plus sign to select the folder you wish to search.  Be sure the selected folder in the list is the only one checked.  In the first example I picked:  /Users/mac/Desktop/iMac/z-find/

     

    The "Search for" field on the first line is used for spotlight. Avoid using this box.

     

    Click on the plus symbol to the right of an input options. Click on the double arrow to the right of the first option. Go down to the name field.

     

    You can now search for the contents of a filename. I searched for name contains: bash-

     

    To see the Classic display format, click on the three line icon which is located on the upper left of the window.  There is a small refresh icon on the lower right of the window.

     

    !http://farm4.static.flickr.com/3485/3240587496_741476de7b.jpg?v=0!

     

    I created the z-find folder on my Macintosh-HD then copy it over to my Spotless flash drive.  This means both searches searched for it the same file names.  See below for the list of file names.

     

    This is the result of the search:
    bash-backup-copy-invisible-attr.html
    bash-backup-inside-bash-copy.html
    bash-backup-inside-bash.html
    bash-backup.html
    bash-batChmod.html
    bash-battery__yellow__4k.html     {labeled with the Yellow attribute}
    bash-copy    {folder}
    bash-copy-invisible-attr    {folder}
    bash-folder__green    {folder and labeled with the Green attribute}
    ping_command-bash-copy.html

     


    You can create a smart folder to take you directly to the search panel.  Just click on the Save icon to the right of the window near the top. For readers of books, you should look under smart folders.

     

    !http://farm4.static.flickr.com/3498/3239759755_d5ebbefe05.jpg?v=0!

     

    There are some downsides. Initially, the search will find both visible and invisible Mac OS files. However, the search seems to get confused between visible and invisible files when you select the visibility option. It seems to get the visible correct when you use visible but when you add invisible things get confused. Sometimes it will find invisible files and sometimes it won't. I used both the Unix invisible files and the Mac OS X visiblity attribute.

     

    In putting the same search in the upper right-hand-corner spotlight search and in the Search for field, I did not get the same results. The spotlight search returned a 182 items while the with Search for field returned 179 items. The Search for field seemed to miss items in the mail boxes. With the Search for search you could display spotlight results in the classic format.

     

    I do not know how this works internally. I successfully a search on my fat32 flash drive.

     

     

    Perform the Classic Mac OS search without the spotlight database.

     

     

    If you turn off spotlight indexing on a volume and delete the spotlight index, then Mac OS Tiger reverts to the prior Mac OS search facility. In the preferences for spotlight, you let searching continued on the partition.

     

    Here is what I did:

     

    I installed the spotless application.
    http://www.fixamac.net/software/spot/

     

    I use spotless to configure spotlight. Click on disabled indexing then click on  delete index files.

     

    !http://farm4.static.flickr.com/3527/3239751839_c760c46628.jpg?v=0!

     

    Spotless creates the .Spotlight-V100 directory with the _IndexPolicy.plist and _rules.plist to prevent indexing on the partition.

    mac $ pwd
    /Volumes/Spotless
    mac $ ls -ld .Spotlight-V100
    drwx------   4 mac  staff  136 Jan 22 23:51 .Spotlight-V100
    mac $ ls -l .Spotlight-V100
    total 16
    -rw-------   1 mac  staff  55 Jan 22 23:51 _IndexPolicy.plist
    -rw-------   1 mac  staff  58 Jan 22 23:51 _rules.plist


    _IndexPolicy.plist:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>Policy</key>
        <integer>3</integer>
    </dict>
    </plist>

    _rules.plist:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>Spot_Auto</key>
        <integer>1</integer>
    </dict>
    </plist>

     

    I put these files on my Macintosh-HD and Spotless partitions.

     

    !http://farm4.static.flickr.com/3363/3219766624_63687ff9a7.jpg?v=0!

     

    Here is the list of files:

    mac $ pwd
    /Volumes/Spotless/iMac/z-find
    mac $ ls -RaF
    ./
    ../
    .DS_Store
    .bash-backup-copy-initial-dot-copy.html
    .bash-copy-initial-dot/
    bash-backup-copy-invisible-attr.html
    bash-backup.html
    bash-batChmod.html
    bash-battery__yellow__4k.html
    bash-copy/
    bash-copy-invisible-attr/
    bash-folder__green/

    ./.bash-copy-initial-dot:
    ./
    ../
    .DS_Store
    bash-backup-inside-bash.html
    ping_command_as_Give.html

    ./bash-copy:
    ./
    ../
    .DS_Store
    bash-backup-inside-bash-copy.html
    ping_command-bash-copy.html

    ./bash-copy-invisible-attr:
    ./
    ../
    .DS_Store
    ping_command_as_Give.html

    ./bash-folder__green:
    ./
    ../
    .DS_Store
    ping_command_as_Give.html
    mac $

     

    I performed the search for files containing "bash-" in the name field.

     

    !http://farm4.static.flickr.com/3430/3240587902_171d8d46c3.jpg?v=0!

     

    This is the result of the search:
    bash-backup-inside-bash-copy.html
    bash-backup.html
    bash-batChmod.html
    bash-battery__yellow__4k.html     {labeled with the Yellow attribute}
    bash-copy    {folder}
    bash-folder__green    {folder and labeled with the Green attribute}
    ping_command-bash-copy.html

     

    Limitations:

     

    Does not search in Unix hidden folders. That is folders beginning with a period (.) .

     

    Sometimes will find files beginning with a period (.).

     

    Does not find Mac OS invisible files.

     

    Using the special features nulls out the search.

     

    The Search for  field seems to give the same result as using the name field.

     

    ---------
    Related tips:
    • by Baltwo
    http://www.macosxhints.com/article.php?story=20050501162147222

     

    If you haven't run Leopard, note that finding stuff is different than Tiger's.
    See http://www.pinkmutant.com/articles/Leopard/leospot.html and my mod to Finder's Find at http://discussions.apple.com/message.jspa?messageID=6725932 for what you can change so you can find stuff excluded by the default structure.

     

    • "Searching for files by name"
    http://cocoacafe.wordpress.com/2007/06/17/fscatalogsearch/

     

    Alternatives:
    FindAnyFile
    "Contrary to Spotlight, it does not use a database but instead uses the file system driver's fast search operations."
    http://apps.tempel.org/FindAnyFile/index.html

     

    • Use the Terminal find command to list files from multiple directories.
    Macintosh-HD -> Applications -> Utilities -> Terminal


    mac $ find ~/Desktop/iMac/z-find  -iname "*bash-*"  -exec ls -dF  {} \;
    /Users/mac/Desktop/iMac/z-find/.bash-backup-copy-initial-dot-copy.html
    /Users/mac/Desktop/iMac/z-find/.bash-copy-initial-dot/
    /Users/mac/Desktop/iMac/z-find/.bash-copy-initial-dot/bash-backup-inside-bash.ht ml
    /Users/mac/Desktop/iMac/z-find/bash-backup-copy-invisible-attr.html
    /Users/mac/Desktop/iMac/z-find/bash-backup.html
    /Users/mac/Desktop/iMac/z-find/bash-batChmod.html
    /Users/mac/Desktop/iMac/z-find/bash-battery__yellow__4k.html
    /Users/mac/Desktop/iMac/z-find/bash-copy/
    /Users/mac/Desktop/iMac/z-find/bash-copy/bash-backup-inside-bash-copy.html
    /Users/mac/Desktop/iMac/z-find/bash-copy/ping_command-bash-copy.html
    /Users/mac/Desktop/iMac/z-find/bash-copy-invisible-attr/
    /Users/mac/Desktop/iMac/z-find/bash-folder__green/
    mac $

     

     

     

     

    • findfile
    "Here’s a simple command-line tool which uses FSCatalogSearch to search for files by name.
    usage: findfile -r   "
    Here is where to find: findfile.
    http://cocoacafe.wordpress.com/2007/06/17/fscatalogsearch/

     

    I am searching file names containing  "bash-" in  the directory "/Users/mac/Desktop/iMac/z-find".
    Macintosh-HD -> Applications -> Utilities -> Terminal


    mac $ ~/findfile -r /Volumes/Macintosh-HD/ "bash-" |\
    additional input:    grep '^/Users/mac/Desktop/iMac/z-find/'
    /Users/mac/Desktop/iMac/z-find/.bash-backup-copy-initial-dot-copy.html
    /Users/mac/Desktop/iMac/z-find/.bash-copy-initial-dot
    /Users/mac/Desktop/iMac/z-find/bash-backup-copy-invisible-attr.html
    /Users/mac/Desktop/iMac/z-find/bash-backup.html
    /Users/mac/Desktop/iMac/z-find/bash-batChmod.html
    /Users/mac/Desktop/iMac/z-find/bash-battery__yellow__4k.html
    /Users/mac/Desktop/iMac/z-find/bash-copy
    /Users/mac/Desktop/iMac/z-find/bash-copy-invisible-attr
    /Users/mac/Desktop/iMac/z-find/bash-folder__green
    /Users/mac/Desktop/iMac/z-find/.bash-copy-initial-dot/bash-backup-inside-bash.ht ml
    /Users/mac/Desktop/iMac/z-find/bash-copy/bash-backup-inside-bash-copy.html
    /Users/mac/Desktop/iMac/z-find/bash-copy/ping_command-bash-copy.html

     

     

     

     

    • You can use the Terminal to search the contents of a file.

     

    You need to combine the find command with the grep command. I am searching for the word pdisk where file names containing  "bash-" in  the directory "/Users/mac/Desktop/iMac/z-find".  The symbols {} \; are needed after the word to search. See:
    man find
    man grep
    for cryptic details.

     

    Macintosh-HD -> Applications -> Utilities -> Terminal


    mac $ find ~/Desktop/iMac/z-find -iname "*bash-*" -type f -exec grep -bil 'pdisk' {} \;
    /Users/mac/Desktop/iMac/z-find/.bash-backup-copy-initial-dot-copy.html
    /Users/mac/Desktop/iMac/z-find/.bash-copy-initial-dot/bash-backup-inside-bash.ht ml
    /Users/mac/Desktop/iMac/z-find/bash-backup-copy-invisible-attr.html
    /Users/mac/Desktop/iMac/z-find/bash-backup.html
    /Users/mac/Desktop/iMac/z-find/bash-copy/bash-backup-inside-bash-copy.html

     

     

     

     

    Robert

  • 12. Re: WHAT now with OSX search function?
    rccharles Level 5 Level 5 (5,370 points)

    I meant to write spotless in the first paragraph!

     

    Robert

  • 13. Re: WHAT now with OSX search function?
    Ramón G Castañeda Level 4 Level 4 (1,445 points)

    paulpen wrote:

     

    …I just don't want my drives being *indexed* all the time. That's because i realized it was indexing them *while* i was doing other things, e.g. testing, copying, antivirus, defragmenting, restoring, etc. Obviously, you don't want the OS indexing the drive at the same time as it's doing other intensive things!…

     

    My sentiments exactly.  It's this intrusiveness that I find intolerable.

  • 14. Re: WHAT now with OSX search function?
    BDAqua Level 10 Level 10 (116,480 points)

    Exactly, & after all of that... it's only going to MAYBE find what Apple thinks you need to find!