[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] chmod (octal math)



> You did mean 664 :)
>
> Minor technicality - it is really OCTAL (base 8) not binary - the 664 is
> the octal representation of the (binary) bits. >
> Okay, I'm getting really technical, but I was an assembly language
> programmer for many years on octal-based systems. I may not know how to
> make a web page file list display full width (well I do now), but I do
know
> my octal arithmetic. I do that math in my head :)
>

Don't know about assembly language, but for the Linux  644 worked fine.

Okay - off topic, but important to understand this is you are setting permissions:

There is no such thing as *Linux 644* - the 644 is independent of Linux, it is an *OCTAL* number, base 8. My comment about the 644 being wrong was referring to the example that showed a bunch of bits that represented 664 - in the example: 110110100 = 664, not 644. 644= 110100100. That is just how it was typed in the example from the other post.

But for a quick lesson in OCTAL (and hex, base 16):
Binary          Octal
001             1
010             2
011             3
100             4
101             5
110             6
111             7
1000            10 (same as 001000)
1001            11 - hex 9
1010            12 - hex A
1011            13 - hex B
1100            14 - hex C
1101            15 - hex D
1110            16 - hex E
1111            17 - hex F
10000           20 - hex 10

So 110100100 is broken as 110 100 100, or 644

That is all I was trying to point out :)

Regards,
Jale