UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: chmodChapter 2
Unix Commands
Next: Reference: cksum
 

chown

chown [options] newowner[:newgroup] files

Change the ownership of one or more files to newowner. newowner is either a user ID number or a login name located in /etc/passwd. The optional newgroup is either a group ID number (GID) or a group name located in the /etc/group file. When newgroup is supplied, the behavior is to change the ownership of one or more files to newowner and make it belong to newgroup.

Note: some systems accept a period as well as the colon for separating newowner and newgroup. The colon is mandated by POSIX; the period is accepted for compatibility with older BSD systems.

Options

-f

Force error messages to be suppressed.

-h

Change the owner on symbolic links. Normally, chown acts on the file referenced by a symbolic link, not on the link itself. (This option is not necessarily available on all Unix systems.)

-R

Recursively descend through the directory, including subdirectories and symbolic links, resetting the ownership ID.


Previous: Reference: chmodUNIX in a Nutshell: System V EditionNext: Reference: cksum
Reference: chmodBook IndexReference: cksum

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System