chgrp 中文man頁面
名稱
chgrp - 改變文件的組所有權
總覽
chgrp [選項] 組文件...
POSIX 選項: [-R] [--]
Austin 草擬選項: [-hHLPR]
GNU 團體指示: [--reference=rfile]
GNU 選項 (簡易格式): [-cfvR] [--help] [--version]
描述
chgrp 為給出的 file(文件) 改變它的組所有權. group(組), 可以是組名和組ID數字兩者之一.
POSIX 選項
- -R
- 遞歸的改變目錄和它的內容的組所有權 (即使遇到錯誤也繼續.)
- --
- 結束選項列表.
AUSTIN 草擬選項
- -h
- 對于給出的文件是符號鏈接的, 就改變符號鏈接的本身,這比改變它指鄉的對象更好.如果系統不支持符號鏈接的組所有權,那就對它不起作用.
- -H (half-logical[半邏輯?])
- (當和 -R 一起給出) 給出的文件操作數書指向目錄的符號鏈接時,改變這個目錄和目錄中文件的組所有權
- -L (logical[(全)邏輯,想來是和上面的對應的])
- (當和 -R 一起給出.) 給出的文件,不論是命令行操作數還是遍歷整個樹,操作數書指向目錄的符號鏈接時, 改變這個目錄和目錄中文件的組所有權.
- -P (physical)
- (當和 -R 一起給出.) 對于一個文件,不論是命令行操作數還是遍歷整個樹, 是符號鏈接的,只改變它本身, 優于(改變)指向的對象如果系統不支持符號鏈接的組所有權,那就對它不起作用.這是默認值.
- -R
- 遞歸的改變目錄和它的內容的組所有權
額外的 GNU 描述
一個 GNU 擴展(***的在fileutils 4.0里)允許 --reference=rfile 作為組的描述:和 rfile 一樣的組.
GNU 選項
- -c, --changes
- 詳細描述對每一個文件的動作:實際上改變了哪個組。
- -f, --silent, --quiet
- 不列出錯誤信息.(那些組不能被改變).
- -h, --no-dereference
- 作用于符號鏈接本身代替它所指向的. 僅可用于 lchown 系統調用被提供時.
- -v, --verbose
- 詳細描述作用或沒作用的所有 文件.
- -R, --recursive
- 遞歸的改變目錄和它的內容的組所有權
GNU 標準選項
- --help
- 顯示使用方法到標準輸出并退出.
- --version
- 顯示版本信息到標準輸出并退出.
環境變量
有以下變量是有通常的意義的 LANG, LC_ALL, LC_CTYPE 和 LC_MESSAGES.對于XSI-conforming系統:NLSPATH有通常的意義.
符合到
POSIX 1003.2 僅要求 -R 選項.使用其它選項不一定有效.
注意
這份 chgrp 描述同樣可以在fileutils-4.0 包中找到; 其它版本也許些微有些差別. 把修正和更新郵到 aeb@cwi.nl. 漏洞報告郵到 fileutils-bugs@gnu.ai.mit.edu.
#p#
NAME
chgrp - change group ownership
SYNOPSIS
chgrp [OPTION]... GROUP FILE...
chgrp [OPTION]... --reference=RFILE FILE...
DESCRIPTION
Change the group of each FILE to GROUP. With --reference, change the group of each FILE to that of RFILE.
- -c, --changes
- like verbose but report only when a change is made
- --dereference
- affect the referent of each symbolic link, rather than the symbolic link itself (this is the default)
- -h, --no-dereference
- affect each symbolic link instead of any referenced file (useful only on systems that can change the ownership of a symlink)
- --no-preserve-root do not treat `/' specially (the default)
- --preserve-root
- fail to operate recursively on `/'
- -f, --silent, --quiet
- suppress most error messages
- --reference=RFILE
- use RFILE's group rather than the specifying GROUP value
- -R, --recursive
- operate on files and directories recursively
- -v, --verbose
- output a diagnostic for every file processed
The following options modify how a hierarchy is traversed when the -R option is also specified. If more than one is specified, only the final one takes effect.
- -H
- if a command line argument is a symbolic link to a directory, traverse it
- -L
- traverse every symbolic link to a directory encountered
- -P
- do not traverse any symbolic links (default)
- --help
- display this help and exit
- --version
- output version information and exit
AUTHOR
Written by David MacKenzie and Jim Meyering.
REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>.
COPYRIGHT
Copyright © 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
SEE ALSO
The full documentation for chgrp is maintained as a Texinfo manual. If the info and chgrp programs are properly installed at your site, the command
- info coreutils chgrp
should give you access to the complete manual.