Skip to content

How to find all symlinks in a directory tree on Mac

If you need to recursively find all symbolic links in a directory tree on a Mac, then you have a couple of options.

You could be trying to find them because a tool like Dropbox is consuming high CPU and you need to remove them, or perhaps you want to move a directory to another machine or network drive and verifying a package is required.

Option 1 – View all files that are symlinks

ls -lR . | grep ^l
Code language: Bash (bash)

Option 2 – View all symlink-files as absolute paths

find . -type l -ls
Code language: Bash (bash)

See also  Find Maximum Subarrays using Java
Tags:
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x