In FreeBSD and also in Linux, how can I get the numerical chmod value of a file? For example, 644 instead of -rw-r--r--? I need an automatic way for a Bash script.
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
|
|
You can get the value directly using a stat output format, e.g. BSD/OS X:
or in Linux
|
|||
|
|
use
By the way , I use |
|||||
|
