{"id":368,"date":"2019-04-28T00:08:23","date_gmt":"2019-04-27T16:08:23","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=368"},"modified":"2020-05-07T15:49:18","modified_gmt":"2020-05-07T07:49:18","slug":"chgrp","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/chgrp","title":{"rendered":"chgrp\u547d\u4ee4 – \u66f4\u6539\u6587\u4ef6\u7528\u6237\u7ec4"},"content":{"rendered":"\n

chgrp\u662f\u82f1\u8bed\u5355\u8bcd\u201cchange group\u201d\u7684\u7f29\u5199\uff0c\u547d\u4ee4\u7684\u4f5c\u7528\u548c\u5176\u4e2d\u6587\u91ca\u4e49\u4e00\u6837\uff0c\u4e3a\u7528\u4e8e\u53d8\u66f4\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u6240\u5c5e\u7fa4\u7ec4\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f: <\/strong> chgrp [\u53c2\u6570] [\u76ee\u5f55]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a\ufeff<\/strong><\/p>\n\n\n\n

-c<\/td>\u6548\u679c\u7c7b\u4f3c”-v”\u53c2\u6570\uff0c\u4f46\u4ec5\u56de\u62a5\u66f4\u6539\u7684\u90e8\u5206 <\/td><\/tr>
-f<\/td>\u4e0d\u663e\u793a\u9519\u8bef\u4fe1\u606f <\/td><\/tr>
-h<\/td>\u5bf9\u7b26\u53f7\u8fde\u63a5\u7684\u6587\u4ef6\u4f5c\u4fee\u6539\uff0c\u800c\u4e0d\u66f4\u52a8\u5176\u4ed6\u4efb\u4f55\u76f8\u5173\u6587\u4ef6<\/td><\/tr>
-R<\/td>\u9012\u5f52\u5904\u7406\uff0c\u5c06\u6307\u5b9a\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u53ca\u5b50\u76ee\u5f55\u4e00\u5e76\u5904\u7406 <\/td><\/tr>
-v<\/td>\u663e\u793a\u6307\u4ee4\u6267\u884c\u8fc7\u7a0b <\/td><\/tr>
--reference <\/td>\u628a\u6307\u5b9a\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u6240\u5c5e\u7fa4\u7ec4\u5168\u90e8\u8bbe\u6210\u548c\u53c2\u8003\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u6240\u5c5e\u7fa4\u7ec4\u76f8\u540c <\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u6539\u53d8\u6587\u4ef6\u7684\u7fa4\u7ec4\u5c5e\u6027\uff1a <\/p>\n\n\n\n

[root@linuxcool ~]# chgrp -v linuxcool file<\/pre>\n\n\n\n

\u6839\u636e\u6307\u5b9a\u6587\u4ef6\u6539\u53d8\u6587\u4ef6\u7684\u7fa4\u7ec4\u5c5e\u6027\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# chgrp --reference=file_1 file_2<\/pre>\n\n\n\n

\u5c06\/usr\/linuxcool\u53ca\u5176\u5b50\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u7684\u7528\u6237\u7ec4\u6539\u4e3acool\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# chgrp -R cool \/usr\/linuxcool<\/pre>\n","protected":false},"excerpt":{"rendered":"

chgrp\u662f\u82f1\u8bed\u5355\u8bcd\u201cchange group\u201d\u7684\u7f29\u5199\uff0c\u547d\u4ee4\u7684\u4f5c\u7528\u548c\u5176\u4e2d\u6587\u91ca\u4e49\u4e00\u6837\uff0c\u4e3a\u7528\u4e8e\u53d8\u66f4\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u6240\u5c5e […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/368"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=368"}],"version-history":[{"count":6,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/368\/revisions"}],"predecessor-version":[{"id":7612,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/368\/revisions\/7612"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}