Skip to content

Instantly share code, notes, and snippets.

@costa
Created October 14, 2009 13:58
Show Gist options
  • Save costa/210091 to your computer and use it in GitHub Desktop.
Save costa/210091 to your computer and use it in GitHub Desktop.
#!/bin/bash
#lslD() { # It's like... ls -ld for all path elements
for node in "$@"
do [ "${node##/*}" ] && node="$PWD/$node"
while [[ "${node%/}" != "$node" || "${node##*/}" == "." ]]
do node="${node%/}"
node="${node%/.}"
done
while [ "$node" ]
do ls -ld "$node"
node="${node%/*}"
done
ls -ld / # :)
done
#}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment