ArticleDirectory
- Parameters
- Option
- Example
Change the file owner or the group associated with the file
Chown [Options]Owner file-list
Chown [Options]Owner: group file-list
Chown [Options]Owner: file-list
Chown [Options]: Group file-list
Parameters
OwnerThe username corresponding to the new owner,File-listList of file path names of the owner or associated groups to be modified
Owner and group users
Parameter |
Yi |
Owner |
The new owner of file-List. The group user is not changed. |
Owner: Group |
New owner of file-list and associated group |
Owner: |
The new owner of file-List. The group associated with file-list is changed to the logon Group of the new owner. |
: Group |
The new group associated with file-List. The owner is not changed. |
Option
-C: displays the changed process information.
-V: displays the changed information.
-F force change
-R recursively change the Directory
Example Chown owner
Darling work #Ls-L total usage0-RW-r --1Siu0January10 15:35Tempdarling work #ChownJack temp darling work #Ls-L total usage0-RW-r --1Jack Siu0January10 15:35Temp
Modify file owner
Chown owner: Group
Darling work #Ls-L total usage0-RW-r --1Jack Siu0January10 15:35Tempdarling work #ChownJACK: Jack temp darling work #Ls-L total usage0-RW-r --1Jack0January10 15:35Temp
Modify the file owner and group
Chown-C: Group
Darling work # Ls - L total usage 0 -RW-r -- 1 Jack 0 January 10 15 : 35 Tempdarling work # Chown - C: Siu temp changed ownership " Temp " From Jack: Jack to: siudarling work # Ls - L total usage 0 -RW-r -- 1 Jack Siu 0 January 10 15 : 35 Temp
Modify the file group and display the modified process information.