stat -c %a /tmp Posted on 2022-12-15 [Thursday] by Jay Jay 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