Simple Linux Command Line notes: chown

Source: Internet
Author: User
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.

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.