How Do I Find Soft Links in Linux?
Contents

Use the ls -l command to check whether a given file is a symbolic link, and to find the file or directory that symbolic link point to. The first character “l”, indicates that the file is a symlink. The “->” symbol shows the file the symlink points to.

ls command to find a symbolic link in UNIX systems

If you combine the output of ls command with grep and use a regular expression to find all entries which start with small L than you can easily find all soft link on any directories. The ^ character is a special regular expression which means the start of the line.

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest