# Displaying file permissions in numerical format...an age old question



## skeelol (Apr 22, 2011)

How?! I've googled and googled and googled but could not find a working command or script. I can't understand why this hasn't ever been implemented into a *nix command either. It seems you always have to use some type of GUI or FTP program to display perms this way. :OOO


----------



## DutchDaemon (Apr 22, 2011)

[cmd=]stat -r somefile | awk '{print $3}'[/cmd]
See stat(1) for other flags.


----------



## skeelol (Apr 22, 2011)

Awesome, you rule! I figured it was stat but couldn't find the proper syntax under FreeBSD. After asking this question on an IRC #freebsd channel, some 14 year old kid banned me because he didn't know the answer, lol. 

Thanks! :beergrin


----------

