Here are some common options you can use with the chown command in Unix-like operating systems:
-
Change Owner Only:
chown username file.txtChanges only the owner of the file to
username. -
Change Group Only:
chown :groupname file.txtChanges only the group of the file to
groupname. -
Recursive Change:
chown -R username:groupname directory/The
-Roption changes the owner and group of the specified directory and all its contents recursively. -
Verbose Output:
chown -v username:groupname file.txtThe
-voption provides a verbose output, showing what changes were made. -
Reference File:
chown --reference=reference_file.txt target_file.txtThis option changes the ownership of
target_file.txtto match that ofreference_file.txt.
If you have any further questions or need more details, feel free to ask!
