On 7/21/05, Bo Jacobsen <subs@systemhouse.dk> wrote:
How do I list all the soft links pointing to a specific file or dir
/Bo
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Hi Bo, e.g. the command "find" with the -samefile option could do this for you. It just looks for another link (if softlinks should be included use the -L option) and checks if any other file has the same inode. But keep in mind this could take some time as it has to check each inode of each file.. Example: ( to shorten the search time I specified a the /bin directory to search only ) you probably know, that the gzip command has some links to it, which, if the link is called instead causes a specific behaviour for gzip (gunzip, zcat). $>find -L /bin -samefile /bin/gzip /bin/gzip /bin/zcat /bin/gunzip hope this helps Markus