Skip to content

Instantly share code, notes, and snippets.

@jasperf
Last active June 30, 2016 03:21
Show Gist options
  • Save jasperf/dcad4256902bdcb7d221 to your computer and use it in GitHub Desktop.
Save jasperf/dcad4256902bdcb7d221 to your computer and use it in GitHub Desktop.
Show chmod file permissions from the command line with numbers (octals) using stat #chmod #permissions #unix
stat -c "%a %n" *
// -c is for file format, %a is for octal, %n is for file name
//http://geeklog.adamwilson.info/article/58/getting-file-permissions-in-octal-on-OS-X
//OSX Yosemite does not work with -c use:
stat -f '%A %a %N' *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment