Skip to content

Instantly share code, notes, and snippets.

@christoomey
Created May 4, 2011 22:25
Show Gist options
  • Save christoomey/956173 to your computer and use it in GitHub Desktop.
Save christoomey/956173 to your computer and use it in GitHub Desktop.
Bash function to list all symlinks in current directory
# List all symlinks in current directory
lns() {
find ./ -type l -maxdepth 1 | awk '{ sub(/.\/+/, ""); print }'
}
# List broken symlinks under current directory
lnsm() {
find -L ./ -type l -maxdepth 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment