OSDN Git Service

Update translations: chroot, csplit, dd, du, pwd
[linuxjm/coreutils.git] / original / man1 / chown.1
1 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.3.
2 .TH CHOWN "1" "January 2016" "GNU coreutils 8.25" "User Commands"
3 .SH NAME
4 chown \- change file owner and group
5 .SH SYNOPSIS
6 .B chown
7 [\fI\,OPTION\/\fR]... [\fI\,OWNER\/\fR][\fI\,:\/\fR[\fI\,GROUP\/\fR]] \fI\,FILE\/\fR...
8 .br
9 .B chown
10 [\fI\,OPTION\/\fR]... \fI\,--reference=RFILE FILE\/\fR...
11 .SH DESCRIPTION
12 This manual page
13 documents the GNU version of
14 .BR chown .
15 .B chown
16 changes the user and/or group ownership of each given file.  If
17 only an owner (a user name or numeric user ID) is given, that user is made the
18 owner of each given file, and the files' group is not changed.  If the
19 owner is followed by a colon and a group name (or numeric group ID),
20 with no spaces between them, the group ownership of the files is
21 changed as well.  If a colon but no group name follows the user name,
22 that user is made the owner of the files and the group of the files is
23 changed to that user's login group.  If the colon and group are given,
24 but the owner is omitted, only the group of the files is changed;
25 in this case,
26 .B chown
27 performs the same function as
28 .BR chgrp .
29 If only a colon is given, or if the entire operand is empty, neither the
30 owner nor the group is changed.
31 .SH OPTIONS
32 .PP
33 Change the owner and/or group of each FILE to OWNER and/or GROUP.
34 With \fB\-\-reference\fR, change the owner and group of each FILE to those of RFILE.
35 .TP
36 \fB\-c\fR, \fB\-\-changes\fR
37 like verbose but report only when a change is made
38 .TP
39 \fB\-f\fR, \fB\-\-silent\fR, \fB\-\-quiet\fR
40 suppress most error messages
41 .TP
42 \fB\-v\fR, \fB\-\-verbose\fR
43 output a diagnostic for every file processed
44 .TP
45 \fB\-\-dereference\fR
46 affect the referent of each symbolic link (this is
47 the default), rather than the symbolic link itself
48 .TP
49 \fB\-h\fR, \fB\-\-no\-dereference\fR
50 affect symbolic links instead of any referenced file
51 (useful only on systems that can change the
52 ownership of a symlink)
53 .TP
54 \fB\-\-from\fR=\fI\,CURRENT_OWNER\/\fR:CURRENT_GROUP
55 change the owner and/or group of each file only if
56 its current owner and/or group match those specified
57 here.  Either may be omitted, in which case a match
58 is not required for the omitted attribute
59 .TP
60 \fB\-\-no\-preserve\-root\fR
61 do not treat '/' specially (the default)
62 .TP
63 \fB\-\-preserve\-root\fR
64 fail to operate recursively on '/'
65 .TP
66 \fB\-\-reference\fR=\fI\,RFILE\/\fR
67 use RFILE's owner and group rather than
68 specifying OWNER:GROUP values
69 .TP
70 \fB\-R\fR, \fB\-\-recursive\fR
71 operate on files and directories recursively
72 .PP
73 The following options modify how a hierarchy is traversed when the \fB\-R\fR
74 option is also specified.  If more than one is specified, only the final
75 one takes effect.
76 .TP
77 \fB\-H\fR
78 if a command line argument is a symbolic link
79 to a directory, traverse it
80 .TP
81 \fB\-L\fR
82 traverse every symbolic link to a directory
83 encountered
84 .TP
85 \fB\-P\fR
86 do not traverse any symbolic links (default)
87 .TP
88 \fB\-\-help\fR
89 display this help and exit
90 .TP
91 \fB\-\-version\fR
92 output version information and exit
93 .PP
94 Owner is unchanged if missing.  Group is unchanged if missing, but changed
95 to login group if implied by a ':' following a symbolic OWNER.
96 OWNER and GROUP may be numeric as well as symbolic.
97 .SH EXAMPLES
98 .TP
99 chown root /u
100 Change the owner of /u to "root".
101 .TP
102 chown root:staff /u
103 Likewise, but also change its group to "staff".
104 .TP
105 chown \-hR root /u
106 Change the owner of /u and subfiles to "root".
107 .SH AUTHOR
108 Written by David MacKenzie and Jim Meyering.
109 .SH "REPORTING BUGS"
110 GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
111 .br
112 Report chown translation bugs to <http://translationproject.org/team/>
113 .SH COPYRIGHT
114 Copyright \(co 2016 Free Software Foundation, Inc.
115 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
116 .br
117 This is free software: you are free to change and redistribute it.
118 There is NO WARRANTY, to the extent permitted by law.
119 .SH "SEE ALSO"
120 chown(2)
121 .PP
122 .br
123 Full documentation at: <http://www.gnu.org/software/coreutils/chown>
124 .br
125 or available locally via: info \(aq(coreutils) chown invocation\(aq