Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I need to find every symbolic link on the server.

The version is AIX 6.1.

man find says

-L Follow symbolic links

But find -L is not a proper usage. Usage: find [-H | -L] Path-list [Expression-list]

I tried to Google this but couldn't find answers.

share|improve this question

migrated from stackoverflow.com Jan 13 '12 at 15:51

This question came from our site for professional and enthusiast programmers.

By default, if you use find /some/directory -name '*.txt', the find command will not follow any symbolic links it finds as it is traversing the sub-structure of the starting directory. If you add the -L option, it will follow symbolic links (and, in particular, if any of those links leads to a directory, it will traverse that remote directory). The reason why this is not the default behaviour is that it can lead to 'infinite' paths. Consider what happens when you have a symlink created by ln -s . xyz...without the -L, there'll be no problem; with it, find runs for a long time. –  Jonathan Leffler Jan 13 '12 at 7:09

1 Answer 1

up vote 7 down vote accepted

You need to pass a top directory name. Some versions of find assume the current directory if you omit it, but not AIX's. Also, -L isn't what you want here: it tells find to follow symbolic links, but that's not what you're asking, you're asking to find symbolic links.

find / -type l -print will print out all the symbolic links.

See man find

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.