.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH CHOWN 1 2020年三月 "GNU coreutils 8.32" 用戶命令 .SH 名稱 chown \- 更改文件屬主與屬組 .SH 概述 \fBchown\fP [\fI\,選項\/\fP]... [\fI\,所有者\/\fP][\fI\,:\/\fP[\fI\,組\/\fP]] \fI\,文件\/\fP... .br \fBchown\fP [\fI\,選項\/\fP]... \fI\,\-\-reference=參考文件 文件\/\fP... .SH 描述 This manual page documents the GNU version of \fBchown\fP. \fBchown\fP changes the user and/or group ownership of each given file. If only an owner (a user name or numeric user ID) is given, that user is made the owner of each given file, and the files' group is not changed. If the owner is followed by a colon and a group name (or numeric group ID), with no spaces between them, the group ownership of the files is changed as well. If a colon but no group name follows the user name, that user is made the owner of the files and the group of the files is changed to that user's login group. If the colon and group are given, but the owner is omitted, only the group of the files is changed; in this case, \fBchown\fP performs the same function as \fBchgrp\fP. If only a colon is given, or if the entire operand is empty, neither the owner nor the group is changed. .SH 選項 .PP 修改每個文件的所有者和/或所屬組爲給定的所有者和/或組。如同時使用 \fB\-\-reference\fP,將每個給定文件的所有者和屬組修改爲參考文件所具有的對應值。 .TP \fB\-c\fP, \fB\-\-changes\fP 類似 verbose 選項,但僅在做出修改時進行報告 .TP \fB\-f\fP, \fB\-\-silent\fP, \fB\-\-quiet\fP 不顯示大多數錯誤消息 .TP \fB\-v\fP, \fB\-\-verbose\fP 輸出各個處理的文件的診斷信息 .TP \fB\-\-dereference\fP 影響每個符號鏈接的原始引用文件(這是默認行爲),而非符號鏈接本身 .TP \fB\-h\fP, \fB\-\-no\-dereference\fP 隻影響符號鏈接,而非被引用的任何文件(僅當系統支持更改符號鏈接的所有者時,該選項纔有用) .TP \fB\-\-from\fP=\fI\,當前所有者\/\fP:當前所屬組 只當每個文件的所有者和組符合選項所指定時才更改所有者和組。其中一個可以省略,這時已省略的屬性就不需要符合原有的屬性 .TP \fB\-\-no\-preserve\-root\fP 不特殊對待“/”(默認行爲) .TP \fB\-\-preserve\-root\fP 不允許在“/”上遞歸操作 .TP \fB\-\-reference\fP=\fI\,參考文件\/\fP 使用指定參考文件的所有者和所屬組信息,而非手工指定 所有者:組 的值 .TP \fB\-R\fP, \fB\-\-recursive\fP 遞歸操作文件和目錄 .PP 以下選項是在指定了 \fB\-R\fP 選項時被用於設置如何遍歷目錄結構體系。如果您指定了多於一個選項,那麼只有最後一個會生效。 .TP \fB\-H\fP 如果命令行參數是一個指向目錄的符號鏈接,則對其進行遍歷 .TP \fB\-L\fP 遍歷每一個遇到的指向目錄的符號鏈接 .TP \fB\-P\fP 不遍歷任何符號鏈接(默認) .TP \fB\-\-help\fP 顯示此幫助信息並退出 .TP \fB\-\-version\fP 顯示版本信息並退出 .PP 如果沒有指定所有者,則不會更改所有者信息。若所屬組若沒有指定也不會對其更改,但當加上 ':' 時 GROUP 會更改爲指定所有者的主要組。所有者和所屬組可以是數字或名稱。 .SH 範例 .TP chown root /u 將 /u 的屬主更改爲"root"。 .TP chown root:staff /u 和上面類似,但同時也將其屬組更改爲"staff"。 .TP chown \-hR root /u 將 /u 及其子目錄下所有文件的屬主更改爲"root"。 .SH 作者 由 David MacKenzie 和 Jim Meyering 編寫。 .SH 報告錯誤 GNU coreutils 的在線幫助: .br 請向 報告翻譯錯誤。 .SH 版權 Copyright \(co 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . .br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH 參見 chown(2) .PP .br 完整文檔請見: .br 或者在本地使用: info \(aq(coreutils) chowns invocation\(aq .SH "跋" .br 本頁面中文版由中文 man 手冊頁計劃提供。 .br 中文 man 手冊頁計劃:\fBhttps://github.com/man-pages-zh/manpages-zh\fR