next up previous contents index
Next: cp Up: Appendix 1: Common UNIX Previous: chmod   Contents   Index

chown

To change the ownership of a file or group of files the chown command is used. This command has the form:

chown <options> [user][:.][group] <files>

If only user is supplied, then the ownership of the file is changed to that user. If a : or . is followed by a user name, then the ownership of the file is changed to the specified user and the group is changed to the login group for that user. If user:group or user.group is provided, not only the ownership of the file is changed to user, but also the group assigned to the file is changed to group.

Files can be designated with wild cards so that a set of files can be changed at the same time.

Several useful options are detailed below. See the man page for complete details:


\begin{hanging}
\item{-c} describe only those files that have been changed.
\ite...
...be changed.
\item{-R} recursively change files in sub-directories.
\end{hanging}

Example:

chown fred ./document.1

will change the ownership of document.1 to user fred.

See also: chmod, chgrp


next up previous contents index
Next: cp Up: Appendix 1: Common UNIX Previous: chmod   Contents   Index
Dale Scheetz