Created
November 29, 2017 06:58
-
-
Save blizzrdof77/4ee14d5f2669245774f60ea2cefc65c5 to your computer and use it in GitHub Desktop.
Short/simple output of namei
This file contains hidden or 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 | |
[[ $# -eq 1 ]] || exit 1 | |
FILEPATH="$1" | |
while true ; do | |
ls -ld "$FILEPATH" | |
[[ "$FILEPATH" != "/" ]] || exit | |
FILEPATH="$( dirname "$FILEPATH" )" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment