Usage: chown [OPTION]... [OWNER][:[GROUP]] FILE...
or: chown [OPTION]... --reference=RFILE FILE...
Change the owner and/or group of each FILE to OWNER and/or GROUP.
With --reference, change the owner and group of each FILE to those of RFILE.
-c, --changes like verbose but report only when a change is made
--dereference affect the referent of each symbolic link (this is
the default), rather than the symbolic link itself
-h, --no-dereference affect each symbolic link instead of any referenced
file (useful only on systems that can change the
ownership of a symlink)
--from=CURRENT_OWNER:CURRENT_GROUP
ここで指定した現在の所有者やグループと一致した
ファイルについてのみ、所有者やグループを変更する。
いずれか一方は省略できる。その場合、省略された方の
属性については一致の検査を行なわない。
--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 owner and group rather than
specifying OWNER:GROUP values
-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 この使い方を表示して終了
--version バージョン情報を表示して終了
Owner is unchanged if missing. Group is unchanged if missing, but changed
to login group if implied by a `:' following a symbolic OWNER.
OWNER and GROUP may be numeric as well as symbolic.
Examples:
chown root /u Change the owner of /u to "root".
chown root:staff /u Likewise, but also change its group to "staff".
chown -hR root /u Change the owner of /u and subfiles to "root".
Report chown bugs to bug-coreutils@gnu.org
GNU coreutils home page:
Usage: chown [OPTION]... [OWNER][:[GROUP]] FILE...
or: chown [OPTION]... --reference=RFILE FILE...
Change the owner and/or group of each FILE to OWNER and/or GROUP.
With --reference, change the owner and group of each FILE to those of RFILE.
-c, --changes like verbose but report only when a change is made
--dereference affect the referent of each symbolic link (this is
the default), rather than the symbolic link itself
-h, --no-dereference affect each symbolic link instead of any referenced
file (useful only on systems that can change the
ownership of a symlink)
--from=CURRENT_OWNER:CURRENT_GROUP
change the owner and/or group of each file only if
its current owner and/or group match those specified
here. Either may be omitted, in which case a match
is not required for the omitted attribute.
--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 owner and group rather than
specifying OWNER:GROUP values
-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
Owner is unchanged if missing. Group is unchanged if missing, but changed
to login group if implied by a `:' following a symbolic OWNER.
OWNER and GROUP may be numeric as well as symbolic.
Examples:
chown root /u Change the owner of /u to "root".
chown root:staff /u Likewise, but also change its group to "staff".
chown -hR root /u Change the owner of /u and subfiles to "root".
Report chown bugs to bug-coreutils@gnu.org
GNU coreutils home page:
CHOWN(1) FSF CHOWN(1)
名前
chown - ファイルの所有者とグループを変更する
書式
chown [オプション]... OWNER[.[GROUP]] FILE...
chown [オプション]... .GROUP FILE...
chown [オプション]... --reference=RFILE FILE...
説明
このマニュアルはGNU版 chown コマンドについての記述である。 chown コマン
ドは、指定されたそれぞれのファイルのユーザおよびグループ、もしくはい ず
れ かの所有権を、オプションではない最初の引数に従って、以下のように変更
する。ユーザ名 (もしくは数値の user ID) のみを指定した場合、それぞれ の
フ ァイルの所有者は指定したユーザになり、グループは変わらない。ユーザ名
に続けてコロンもしくはドットとグループ名 (もしくは数値の group ID) を間
に スペースを入れずに指定した場合、同じようにそれらのファイルのグループ
所有権も指定したグループに変わる。ユーザ名に続いてコロンもしくはドッ ト
が あるのにグループ名が無い場合、ファイルの所有権はそのユーザになり、フ
ァイルのグループはそのユーザのログイングループに変更される。コロンも し
く はドットとグループは指定されているがユーザ名が無い場合、ファイルのグ
ループのみが変更される。この場合、 chown コマンドは chgrp コマンドと 同
じ働きをする。
オプション
そ れ ぞ れ のFILE の所有者およびグループもしくはいずれかを、 OWNERおよ
びGROUPもしくはいずれかに変更する。
-c, --changes
実際に変更があった場合の動作を詳細に表示する。
--dereference
シンボリックリンクそれ自身ではなく、指している先を変更する。
-h, --no-dereference
指している先ではなく、シンボリックリンクそれ自身を変更する。 (シ
ンボリックリンクの所有権を変更できるシステムの場合のみ有効)
-f, --silent, --quiet
ほとんどのエラーメッセージの出力を抑える。
--reference=RFILE
明示的にOWNER.GROUP値を指示する代わりに、指定したファイル(RFILE)
のユーザ、グループを使う。
-R, --recursive
ファイルやディレクトリの所有権を再帰的に変更する。
-v, --verbose
実行した内容を表示する。
--help 使用方法を表示して正常終了する。
--version
バージョン情報を出力して正常終了する。
所有者は指定しないと変更されない。グループは指定しないと変更されない が
、 コロンもしくはドットで指定された場合は、ログイングループに変更される
。
バグレポート
バグレポートは
CHOWN(1) User Commands CHOWN(1)
NAME
chown - change file owner and group
SYNOPSIS
chown [OPTION]... [OWNER][:[GROUP]] FILE...
chown [OPTION]... --reference=RFILE FILE...
DESCRIPTION
This manual page documents the GNU version of chown. chown 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,
chown performs the same function as chgrp. If only a colon is given,
or if the entire operand is empty, neither the owner nor the group is
changed.
OPTIONS
Change the owner and/or group of each FILE to OWNER and/or GROUP. With
--reference, change the owner and group of each FILE to those of RFILE.
-c, --changes
like verbose but report only when a change is made
--dereference
affect the referent of each symbolic link (this is the default),
rather than the symbolic link itself
-h, --no-dereference
affect each symbolic link instead of any referenced file (useful
only on systems that can change the ownership of a symlink)
--from=CURRENT_OWNER:CURRENT_GROUP
change the owner and/or group of each file only if its current
owner and/or group match those specified here. Either may be
omitted, in which case a match is not required for the omitted
attribute.
--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 owner and group rather than specifying OWNER:GROUP
values
-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
Owner is unchanged if missing. Group is unchanged if missing, but
changed to login group if implied by a ‘:’ following a symbolic OWNER.
OWNER and GROUP may be numeric as well as symbolic.
EXAMPLES
chown root /u
Change the owner of /u to "root".
chown root:staff /u
Likewise, but also change its group to "staff".
chown -hR root /u
Change the owner of /u and subfiles to "root".
AUTHOR
Written by David MacKenzie and Jim Meyering.
REPORTING BUGS
Report chown bugs to bug-coreutils@gnu.org
GNU coreutils home page:
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa