Operating System - HP-UX
1836525 Members
3458 Online
110101 Solutions
New Discussion

How to find symbolic links in filesystems - URGENT!!

 
SOLVED
Go to solution
Simon R Wootton
Regular Advisor

How to find symbolic links in filesystems - URGENT!!

Can anyone tell me how to quickly see if I have any symbolic links within a directory structure on a given filesystem, even if the symbolic link is several levels down the directories. All help rewarded.
3 REPLIES 3
Patrick Wallek
Honored Contributor
Solution

Re: How to find symbolic links in filesystems - URGENT!!

Try this:

# find /path -type l -exec ll -d {} \;

The '-type l' is the key. That will find links.
Michael Tully
Honored Contributor

Re: How to find symbolic links in filesystems - URGENT!!

Darrell Allen
Honored Contributor

Re: How to find symbolic links in filesystems - URGENT!!

If you need to limit your search to a specific filesystem, I'd suggest you add the "-xdev" argument. This keeps you from checking filesystems mounted subordinate to the one you specify.

# find /path -type l -xdev -exec ll -d {} \;

# find /filesystem -type l -xdev | xargs ll -d

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)