Created
March 31, 2020 01:40
-
-
Save SirJson/5088974cbc662eb3d56f3663f442ce96 to your computer and use it in GitHub Desktop.
Scans the current directory tree for symlinks and where they are linked
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
resolve_link() { | |
printf "%s => %s\n" "$1" "$(readlink -nf $1)" | |
} | |
find . -type l -print0 | while IFS= read -r -d '' file; do resolve_link "$file"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment