stat -c %a /tmp

So you can use `stat -c %a $path` to get the octal spec for use with `chmod`:

# stat -c %a /tmp
1777
# stat -c %a /
755

Leave a Reply