I would've written the solution to this thread since I got this idea from there, but unfortunately, it's closed: http://www.unix.com/unix-dummies-questions-answers/119538-ls-switch-view-octal-permissions.html
Solution: ditch ls and use stat instead---stat can format its output similar to date.
$ stat -c %a "${filename}"
644
No comments:
Post a Comment