1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-11-02 09:17:57 +01:00
tldr/pages/common/chown.md
2016-01-08 09:38:59 +01:00

532 B

chown

Change the owning user/group of the specified files.

  • Change the user of a file:

chown {{user}} {{path/to/file}}

  • Change the user and group of a file:

chown {{user}}:{{group}} {{path/to/file}}

  • Recursively change the owner of an entire folder:

chown -R {{user}} {{path/to/folder}}

  • Change the owner of a symbolic link:

chown -h {{user}} {{path/to/symlink}}

  • Use the owner and group of a reference file and apply those values to another file:

chown --reference={{reference-file}} {{path/to/file}}