Finding Symbolic Links in AIX

Ever had to find symbolic links on an AIX system?  I had to the other day … sharing in case anyone else has a need to do the same!

The quick

While this is more specific for AIX (as that’s the platform I used it on) the same command should run on another *nix platforms (you might need to tweak a little)
The first way is fairly brute-force

find ./ -type l -print > /tmp/brutal-linkreport.txt

It works, it’s just not very elegant

More Elegant

The second solution that I found is a lot more efficient, and I prefer its output – so it’s definitely my preferred approach!
lsfs | awk '$3~/\//{print $3}'| while read FS ; do
find $FS -xdev -type l -ls | tee -a /tmp/linkreport.txt
done
 I hope that this helps – feel free to let me know what you think!