bsfmig
2012-01-13 06:24 deepin
http://en.wikipedia.org/wiki/Chown
http://linux.vbird.org/linux_basic/0210 ... .php#chown
Usage examples
These examples illustrate typical syntax and use. Because chown modifies permissions, it usually requires root privilege to run.
Change the owner of /var/run/httpd.pid to 'root' (the standard name for the Superuser).Copy the Code
- # chown root /var/run/httpd.pid
Change the owner of strace.log to 'rob' and the group identifier to 'developers'.Copy the Code
- # chown rob:developers strace.log
Change the owner of /tmp and /var/tmp to ‘nobody’ (not a good idea), and change the group of /tmp and /var/tmp to ‘nogroup’Copy the Code
- # chown nobody:nogroup /tmp /var/tmp
Change the group identifier of /home to 512 (regardless of whether a group name is associated with the identifier 512 or not).Copy the Code
- # chown :512 /home
Change the ownership of base to the user foouser and make it recursive (-R)Copy the Code
- # chown -R foouser base
Change the ownership to newuser and group to newgroup for all of the files and directories in current directory, and all subdirectories (recursively).Copy the Code
- # chown -R newuser:newgroup .
http://linux.vbird.org/linux_basic/0210 ... .php#chown
Reply Like 0 View the author
我已经新建了root账户,可以用root账户登陆
需要批量修改文件所有者和群组的目录为 /home/cxbii/ 下所有文件夹和文件
我需要批量把 /home/cxbii/ 下的所有文件和文件夹的所有者改为cxbii,群组也为cxbii
需要用到chown命令
可是具体怎么输入呢?