chown — stdin stdout - file -- opt --help --version
chown [options
]user_spec files
The chown
(change owner)
command sets the ownership of files and directories. To make user
smith
the owner of several files
and a directory, run:
# chown smith myfile myfile2 mydir
The user_spec
parameter may be any
of these possibilities:
A username (or numeric user ID), to set the owner:
chown smith myfile
A username (or numeric user ID), optionally followed by a
colon and a group name (or numeric group ID), to set the owner
and group: chown smith:users myfile
A username (or numeric user ID) followed by a colon, to
set the owner and to set the group to the
invoking user’s login group: chown smith:
myfile
A group name (or numeric group ID) preceded by a colon, to
set the group only: chown :users myfile
--reference=
file
to set the same owner and group
as another given file
3.15.229.113