Command format:
chown [option] Owner: A group file or directory (option is not writable)
Command function:
Change the attribution of a file or directory
Common options:
- R recursively modifies directory attribution
- H Modifying the attribution of symbolic links
- v show verbose process
Common examples:
Example one: Change the owner and host group of file files to Zhangsan, which is currently the root user
Command: chown zhangsan:zhangsan file
Example two: Change the owner and the genus Dir to Zhangsan, which is currently the root user
Command: chown-r zhangsan:zhangsan dir
Example three: Only the genus Dir of the directory is changed to Zhangsan, the other unchanged
Command: chown-r: Zhangsan dir
Note: separated by ":" Between the master and the group, if you directly change the direct write ": Group name"
This article is from the "Shiyu" blog, make sure to keep this source http://928004321.blog.51cto.com/10707688/1731367
Linux command--chown