• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Efficiently searching for file name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Efficiently searching for file name


  • Subject: Re: Efficiently searching for file name
  • From: Brian Redman <email@hidden>
  • Date: Sun, 6 Oct 2002 23:36:33 -0400

If it makes the Unix find(1) command any more attractive you can redirect the errors
so they aren't displayed. If you run it with /bin/sh the syntax is:

find / -x -name whatever 2>/dev/null

The "2>/dev/null" redirects standard error (file descriptor 2) output to the bit bucket. The other
shells surely have the same functionality but I don't their syntax.


brian

On Sunday, October 6, 2002, at 09:36 PM, David Crowe wrote:

I'd like an efficient way to search for a file by name throughout my hard drive, just like Sherlock (or Find in 10.2) or FileBuddy can do in a few seconds.

So far I haven't found anything that works well:

1. FileBuddy appears to be virtually non-scriptable.

2. Sherlock does not appear to be able to search for files by name, just by content. I'd
love to be corrected if I'm wrong.

3. Finder:

tell application "Finder"
every file of startup disk whose name is "foo.jpg"
end

Only searches one level of the disk's file system

4. The finder comment: every file of every folder of startup disk whose name is "foo.jpg"

... takes almost forever (many minutes on my machine).

5. The Unix "find" command also seems to take a long time, and spits out error messages
every time it comes across a directory it can't open because of privileges.


I'm sure there is a way to do this efficiently, since Sherlock etc. can do these searches quite quickly.

- David Crowe
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Efficiently searching for file name
      • From: bill fancher <email@hidden>
References: 
 >Efficiently searching for file name (From: David Crowe <email@hidden>)

  • Prev by Date: Re: Add signatures to Mail
  • Next by Date: Re: Add signatures to Mail
  • Previous by thread: Efficiently searching for file name
  • Next by thread: Re: Efficiently searching for file name
  • Index(es):
    • Date
    • Thread