Skip to content

Instantly share code, notes, and snippets.

@markusritschel
Created June 23, 2020 14:49
Show Gist options
  • Save markusritschel/d8c4595fae4b6574faa3e0c32ee1cd3e to your computer and use it in GitHub Desktop.
Save markusritschel/d8c4595fae4b6574faa3e0c32ee1cd3e to your computer and use it in GitHub Desktop.
print the canonical path (true path) of a linked directory
canonical_path() {
perl -mCwd -le ' print Cwd::abs_path $ARGV[0] ' -- "$1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment