Sign up ×

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 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

2 Answers 2

up vote 9 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

If you want to know what the symbolic link points to, enter following command:


share|improve this answer

Your Answer


