Skip to main content

Shell command to print a list of all symbolic links (symlinks) in a directory.

# To show symbolic links in the current directory using find (ref: https://askubuntu.com/a/522059):
find . -maxdepth 1 -type l -ls

# To show all symbolic links in the current directory using file, grep, and cut:
file -h ./* | grep "symbolic link to " | cut -d : -f 1