Name

chown — stdin  stdout  - file  -- opt  --help  --version

Synopsis

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

Useful options

--dereference

Follow symbolic links and operate on the files they point to.

-R

Recursively change the ownership within a directory hierarchy.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.229.113