Tizen 2.0 Release
[external/tizen-coreutils.git] / man / chown.1
1 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.35.
2 .TH CHOWN "1" "March 2007" "GNU coreutils 6.9" "User Commands"
3 .SH NAME
4 chown \- change file owner and group
5 .SH SYNOPSIS
6 .B chown
7 [\fIOPTION\fR]... [\fIOWNER\fR][\fI:\fR[\fIGROUP\fR]] \fIFILE\fR...
8 .br
9 .B chown
10 [\fIOPTION\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\-\-dereference\fR
40 affect the referent of each symbolic link (this is
41 the default), rather than the symbolic link itself
42 .TP
43 \fB\-h\fR, \fB\-\-no\-dereference\fR
44 affect each symbolic link instead of any referenced
45 file (useful only on systems that can change the
46 ownership of a symlink)
47 .TP
48 \fB\-\-from\fR=\fICURRENT_OWNER\fR:CURRENT_GROUP
49 change the owner and/or group of each file only if
50 its current owner and/or group match those specified
51 here.  Either may be omitted, in which case a match
52 is not required for the omitted attribute.
53 .TP
54 \fB\-\-no\-preserve\-root\fR
55 do not treat `/' specially (the default)
56 .TP
57 \fB\-\-preserve\-root\fR
58 fail to operate recursively on `/'
59 .TP
60 \fB\-f\fR, \fB\-\-silent\fR, \fB\-\-quiet\fR
61 suppress most error messages
62 .TP
63 \fB\-\-reference\fR=\fIRFILE\fR
64 use RFILE's owner and group rather than
65 specifying OWNER:GROUP values
66 .TP
67 \fB\-R\fR, \fB\-\-recursive\fR
68 operate on files and directories recursively
69 .TP
70 \fB\-v\fR, \fB\-\-verbose\fR
71 output a diagnostic for every file processed
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 \fB\-hR\fR 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 Report bugs to <bug\-coreutils@gnu.org>.
111 .SH COPYRIGHT
112 Copyright \(co 2007 Free Software Foundation, Inc.
113 .br
114 This is free software.  You may redistribute copies of it under the terms of
115 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
116 There is NO WARRANTY, to the extent permitted by law.
117 .SH "SEE ALSO"
118 chown(2)
119 .PP
120 The full documentation for
121 .B chown
122 is maintained as a Texinfo manual.  If the
123 .B info
124 and
125 .B chown
126 programs are properly installed at your site, the command
127 .IP
128 .B info chown
129 .PP
130 should give you access to the complete manual.