On Mon, May 07, 2007 at 01:31:16PM +1000, Amos Shapira wrote: > > What about "find -L -samefile give-target"? > > e.g. > > $ touch target > $ ln -s target link-to-target > $ ls -l > total 0 > lrwxrwxrwx ... link-to-target -> target > -rw-r--r-- ... target > $ find -L -samefile target > ./target > ./link-to-target
Nice! I was about to suggest using find . -exec ls -ldiL {} \; then grepping/parsing the result for the inode but using find's nibuilt features is better. (for ls, i says show the inode number, L means resolve links) Matt -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html