3

I can find original files in a directory (as opposed to hard links) in Terminal with

find ./ -type f -links 1 -name file2find

How can I view the results in a single Finder window?

1 Answer 1

1

If it's just about revealing the file, use exec and open -R. This will open a Finder window and highlight the file:

find . -type f -links 1 -name file2find -exec open -R {} \;

Note that this only works for one file, since repeated calls to open -R will not open a new Finder window, but re-use the existing one(s) to change the highlighted file.

4
  • Thanks but I'm trying to get all the results in a single window.
    – MH9
    Jul 20, 2012 at 19:09
  • So do you expect your find command to return multiple files in different folders? And do you expect Finder to show these files all in one window?
    – slhck
    Jul 20, 2012 at 19:31
  • Yes. Like a Finder search normally does, but Finder seems to return some hard links whereas the bash command returns what I want.
    – MH9
    Jul 20, 2012 at 20:25
  • Hm, there's no way other to do this through an actual Finder Spotlight search… so your real search requirement is what, exactly?
    – slhck
    Jul 20, 2012 at 21:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .