On Friday 08 September 2006 14:25, Jan Engelhardt wrote:
Let me show you how to correctly catch a fish.
The "r w x" in binary will have the values "4 2 1". So, "r w -" will have the values "4 2 -", that sums up to 6.
So again, "r w x" will be "4 2 1" = 4+2+1 = 7, hence the create mode 777
4 | 2 | 1 = 7
To be perfectly correct, 4+2+1 is *exactly* the same as 4|2|1: 4 = binary 100 2 = binary 010 1 = binary 001 binary 100 + 010 + 001 == binary 111 binary 100 | 010 | 001 == binary 111 The only time there's a difference between + and | is when the bit patterns of the numbers overlap. e.g., 3+1 ist not the same as 3|1: binary 011 + 001 == 100 binary 011 | 001 == 011 -- ----- stephan@s11n.net http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts