Sort date column under Unix what is

Unix commands for beginners

Where did you get the numbers from? I mean what do they mean?

r = 4 w = 2 x = 1

r has the value 4, w has the value 2 and x has the value 1.

With this you can express all combinations of r, w and x as a number between 0 and 7:

--- 0 --x 1 -w- 2 -wx 3 (= 2 + 1) r-- 4 rx 5 (= 4 + 1) rw- 6 (= 4 + 2) rwx 7 (= 4 + 2 + 1) rwx | rwx | rwx owner | group | rest of the world

I can't explain the "666" to myself!

You can also express the permissions for each of these three sections as a number from 0 to 7. The total permissions as a three-digit number with digits between 0 and 7.

Common are:

644 rw-r - r-- ==> Owner may read + write, rest only read. 600 rw ------- ==> Owner is allowed to read + write, nothing else is allowed. 640 rw-r ----- ==> Owner may read + write, group read, the rest may not do anything.

With "chmod" you can change individual permissions:

chmod g + w file.ext g + w set write permission for group o-w delete write permission for rest of the world u + w set write permission for owner go + x set execute permission for group and rest of the world u + rwx set all permissions for owner.

or stop all at once.

Thanks for the explanations about the "chmod math" :-) to the wolf