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

Re: Which ICQ Client is better?



On Tue, Nov 19, 2002 at 08:44:23AM -0500, Nori Heikkinen wrote:
> wa-hoo!  of course ... didn't even think to look there.  changed to
> 644 (btw, can anyone enlighten me on specifying the first bit (*0*644)
> all the time?  i never have, and haven't had any problems), and all
> works.

Cool.

As for 644 versus 0644, it depends on the context. In parameters to
/bin/chmod, it doesn't matter, so you won't have seen any problems.

However, the numeric mode is really an base-8 (octal) number. In some
languages the argument to the chmod equivalent is a plain number (rather
than in shell where everything is naturally a character string), and if
you just say 644 then that'll be treated as decimal and come out as 1204
octal, which definitely isn't what you want. The leading 0 is what at
least Perl and C use to indicate that a number should be read as octal
rather than decimal.

I try to write 0644 out of habit, on the basis that I'm less likely to
make mistakes that way.

Cheers,

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: