Friday, March 30, 2007

Chown syntax

Abstract: chown jdoe:

Today, an easy one.

In old unix books we still find sample chown syntax using a dot separator instead of a colon :
$ chown user.group file

This method can still be used, however the colon one is preferred. This can tell you who learned unix using old books ;-)

Another interesting thing with chown is :
$ chown user: file

This set the owner of file to user and the owner group to the natural group of user, which is the one defined in /etc/passwd. That's a word you don't have to type (and/or to look for).

No comments: