Home

Geeklog: What I Learnt Today / Adam

getting file permissions in octal on OS X

> If you want to get file permissions in octal (e.g 644, 777 etc) on OS X you can't use stat -c it doesn't seem to be supported but you can use the following
stat -f '%A %a %N' *
That works for me on OSX 10.5.8, but it does seem a little complex, I've just not found a simpler way yet.

/ Adam