In the Linux command, the chown command can change the owner of the file. Generally, this command is used as the administrator of the system. The general user does not have permission to use it. The editor gives you a detailed introduction to the usage of the chown command.
System administrators often use the chown command after the files are copied to another user's directory, allowing users to have permission to use the file.
1. Command format:
The code is as follows:
chown [options]. . . [Owner][:[group]] file. . .
2. Command function:
Change the owner and group of files by chown. User name and user ID settings can be used when changing the owner or group of files. Ordinary users cannot change their own files to other owners. Its operating rights are generally administrators.
3. Command parameters:
Required parameters:
-c Display information about changed parts
-f Ignore error information
-h Fix symbolic links
-R Processes all files in the specified directory and its subdirectories
-v Displays detailed processing information
-deference acts on the symbolic link instead of the link file itself
Select parameters:
--reference="Directory or file" Set the specified directory/file as a reference and set the file/directory of the operation to the same owner and group of reference files/directories. Group
--from= "Current User: Current Group" Change only if the current user and group are the same as the specified user and group
--help Display help information < Br>
--version Display version information
4. Example:
Instance 1: Changing Owners and Groups
Command:
The code is as follows:
chown mail:mail log2012.log
Output:
Previous123Next page Total 3 pages
As a webmaster, not only to ensure the website traffic increases, but also to prevent DDOS attacks,
There are many commands under Linux system. These commands can be divided into several types accordi
CKEditor is commonly referred to fCKEDITOR, it is an excellent web editor, can supp
Firefox is a browser that users like very much on Linux systems, but Firefox often has garbled chara
Linux tips for modifying tab widths
How Linux uses the OpenSSL command line
How to install and set GlusterFS on CentOS 6.4
Git Workflow and Basic Operations in Linux
How Linux sets IPMI through the command line
Two classifications of Linux system commands
How to use the top command to monitor Linux system performance
How Linux System Supervisor manages processes
Detailed usage of nl commands under Linux
Microsoft officially launched Win10 preview version 10547, with a number of improvements
Microsoft Highlights: Online Backup Service
Install the original Win7 three-class method
Let your local APACHE server support .htaccess
Mobile phone texting has been out. Try sending it with your computer
Win7 system hard disk partition how to merge
2345 browser uninstall the cleanest 2 ways to introduce?
Win 7 system blue screen hot fix patch
Win10 preview version 10041 supports fixing the setting options to the start menu
Windows XP: Smart Screening Plugin Installation Window Method