Skip to content

Instantly share code, notes, and snippets.

@blizzrdof77
Created November 29, 2017 06:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blizzrdof77/4ee14d5f2669245774f60ea2cefc65c5 to your computer and use it in GitHub Desktop.
Save blizzrdof77/4ee14d5f2669245774f60ea2cefc65c5 to your computer and use it in GitHub Desktop.
Short/simple output of namei
#!/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