Chown: Difference between revisions

From Psygen Wiki
Jump to navigation Jump to search
Created page with "chown changes the user and/or group ownership of a file or directory. == References == <ol> <li>[http://man.he.net/?topic=chown&section=all chown man page]</li> </ol>"
 
No edit summary
Line 1: Line 1:
chown changes the user and/or group ownership of a file or directory.
chown changes the user and/or group ownership of a file or directory.
== Examples: ==
<code>chown bob myfile.txt</code> Changes the owner of '''myfile.txt''' to '''bob'''
<code>chown :office myfile.txt</code> Change just the group of '''myfile.txt''' to '''office'''.
<code>chown bob:office myfile.txt</code> Change the owner of '''myfile.txt''' to '''bob''', and change the group to '''office'''
<code>chown bob. myfile.txt</code> Change the owner of '''myfile.txt''' to '''bob''', and change the group to the '''bob''' group.


== References ==
== References ==

Revision as of 03:07, 21 December 2016

chown changes the user and/or group ownership of a file or directory.

Examples:

chown bob myfile.txt Changes the owner of myfile.txt to bob

chown :office myfile.txt Change just the group of myfile.txt to office.

chown bob:office myfile.txt Change the owner of myfile.txt to bob, and change the group to office

chown bob. myfile.txt Change the owner of myfile.txt to bob, and change the group to the bob group.

References

  1. chown man page