I need to set the same chmod, how to get number for -rw-r--r-- ?
|
Please check
|
|||||
|
|
The full permissions mode number is a 4-digit octal number, though most of the time, you only use the 3 least-significant digits. Add up each group in the permissions string, taking r=4, w=2, x=1. For example:
Now, sometimes you'll see an odd modestring like this:
The fourth digit is overloaded onto the
The standard UNIX way to show that a number is octal is to start it with a zero. GNU Finally, if you see a
then that means the file has extended permissions, and you'll need more than |
|||
|
|
chmodsupports--reference: “--reference=RFILE use RFILE's mode instead of MODE values” – man chmod. – manatwork May 31 '12 at 6:44