User Tools

Site Tools


chown_and_chmod_examples

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
chown_and_chmod_examples [2016/08/10 09:08] walkeradminchown_and_chmod_examples [2016/08/10 09:10] walkeradmin
Line 66: Line 66:
 \\      \\     
 In the above example, we first checked the owner/group of the reference-file ‘file’ and then checked the owner/group of the target-file ‘tmpfile’. Both were different.  Then we used the chown command with the ‘–reference’ option to apply the owner/group settings from the reference file to the target file. The command was successful and the owner/group settings of ‘tmpfile’ were made similar to the ‘file’ In the above example, we first checked the owner/group of the reference-file ‘file’ and then checked the owner/group of the target-file ‘tmpfile’. Both were different.  Then we used the chown command with the ‘–reference’ option to apply the owner/group settings from the reference file to the target file. The command was successful and the owner/group settings of ‘tmpfile’ were made similar to the ‘file’
 +\\ 
 +\\ 
 +==== List all the changes made by the chown command ====
 +    Use the verbose option -v, which will display whether the ownership of the file was changed 
 +    or retained as shown below.
 +    
 +    # chown -v -R guest:friends linux
 +    changed ownership of `linux/redhat/rh7' to guest:friends
 +    changed ownership of `linux/redhat' retained to guest:friends
 +    ownership of `linux/redhat_sym' retained as guest:friends
 +    ownership of `linux/ubuntu_sym' retained as guest:friends
 +    changed ownership of `linux/linuxKernel' to guest:friends
 +    changed ownership of `linux/ubuntu/ub10' to guest:friends
 +    ownership of `linux/ubuntu' retained as guest:friends
 +    ownership of `linux' retained as guest:friends
 \\  \\ 
 \\  \\ 
 +
  
chown_and_chmod_examples.txt · Last modified: 2023/03/09 22:35 by 127.0.0.1