mac os x, find all symbolic links that point to files on a different volume

Posted by Eddified on Super User See other posts from Super User or by Eddified
Published on 2011-01-14T04:19:40Z Indexed on 2011/01/14 4:55 UTC
Read the original article Hit count: 213

Filed under:
|
|

In my ~ dir, I have some symlinks that point to "/Volumes/Macintosh HD 2/..." and I want to find them all recursively. A look at the man page for 'find' says the '-lname' argument will search the symbolic link contents. It appears to work, but not recursively:

$ pwd
/Users/myusername
$ sudo find . -lname '/Volumes*' 
$ cd Documents/
$ sudo find . -lname '/Volumes*' 
./Documents on Win7
./work.rtf

What's going on? How can I make this work recursively? -- The 'find' program is supposed to always work recursively.

I checked perms, they look ok, but as you can see I used "sudo" just to be sure... no dice.

$ ls -ld Documents/
drwx------+ 14 myusername  staff  476 Jan 12 16:32 Documents/

© Super User or respective owner

Related posts about osx

Related posts about find