3

Why does GNU chown user.group work? The docs say nothing of the syntax being supported. Is there a juicy story behind it?

2
  • 1
    Same question here Nov 24, 2015 at 18:14
  • great example of a question that should have been migrated here. Nov 24, 2015 at 18:31

1 Answer 1

8

info chown is clear on that:

Some older scripts may still use `.' in place of the `:' separator.
POSIX 1003.1-2001 (*note Standards conformance::) does not require
support for that, but for backward compatibility GNU `chown' supports
`.' so long as no ambiguity results. New scripts should avoid the use
of `.' because it is not portable, and because it has undesirable
results if the entire OWNER`.'GROUP happens to identify a user whose
name contains `.'.

In case of GNU programs it's often worth checking not only man but also info pages because GNU folks abhor man pages (from man tar).

1
  • 2
    Important historical context: when chown first gained the ability to do user and group in a single command (4.3BSD is the earliest such example I can find), people didn't do crazy things like put dots in their usernames. Dots, dashes, capital letters, more than 8 characters long... all unthinkable. Also the colon is the one character that's safe from future growth of the set of allowable usernames, because it's the separator in /etc/passwd
    – user41515
    Oct 21, 2016 at 21:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .