chown (change owner) Changes the owner of a file.Format: chown newowner filename Examples: chown janet file29.txt The file file29.txt now has the owner janet. Only the owner of the file or the super user can change the owner. Opt | What It Does | Example |
---|
-c | Display info about file changes | chown -c janet file2 changed group of 'file2' to janet
| -R | Make changes in all subdirectories | chown -R janet file3 changes file3 in any subdirectories, as well
| |