diff options
| author | Soccera1 <[email protected]> | 2026-07-28 16:08:14 +1000 |
|---|---|---|
| committer | Soccera1 <[email protected]> | 2026-07-28 16:08:48 +1000 |
| commit | 9846f087eb28bf11df740675ef487657ded39b69 (patch) | |
| tree | e91dbd19b524f9432da6bcb86b1fc193e0d02e26 /man/chown.1 | |
| parent | 7fa396c9ef22b32a0b05e94aaa0266dd3e7515f8 (diff) | |
| parent | 6a2f098e72e71437154ec00506e8e736aa8e1026 (diff) | |
| download | bnu-9846f087eb28bf11df740675ef487657ded39b69.tar.gz bnu-9846f087eb28bf11df740675ef487657ded39b69.zip | |
Merge branch 'master' into refactor/single-call-commandsrefactor/single-call-commands
# Conflicts:
# README.md
Diffstat (limited to 'man/chown.1')
| -rw-r--r-- | man/chown.1 | 130 |
1 files changed, 130 insertions, 0 deletions
diff --git a/man/chown.1 b/man/chown.1 new file mode 100644 index 0000000..6ffd848 --- /dev/null +++ b/man/chown.1 @@ -0,0 +1,130 @@ +.\" Adapted for BNU from the GNU Coreutils 9.11 manual page; see doc/README.md. +.TH CHOWN "1" "2026-07-28" "BNU 9.11" "BNU Commands" +.SH NAME +chown \- change file owner and group +.SH SYNOPSIS +.B chown +[\fI\,OPTION\/\fR]... [\fI\,OWNER\/\fR][\fI\,:\/\fR[\fI\,GROUP\/\fR]] \fI\,FILE\/\fR... +.br +.B chown +[\fI\,OPTION\/\fR]... \fI\,--reference=RFILE FILE\/\fR... +.SH DESCRIPTION +.\" This page is derived from GNU Coreutils documentation. +This page documents BNU, an independent Bun implementation compatible with +GNU Coreutils 9.11. +This manual page +describes the BNU implementation of +.BR chown . +.B 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, +.B chown +performs the same function as +.BR chgrp . +If only a colon is given, or if the entire operand is empty, neither the +owner nor the group is changed. +.SH OPTIONS +.PP +Change the owner and/or group of each FILE to OWNER and/or GROUP. +With \fB\-\-reference\fR, change the owner and group of each FILE to those of RFILE. +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown-c'\fB\-c, \-\-changes\fP\X'tty: link' +like verbose but report only when a change is made +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown-f'\fB\-f, \-\-silent, \-\-quiet\fP\X'tty: link' +suppress most error messages +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown-v'\fB\-v, \-\-verbose\fP\X'tty: link' +output a diagnostic for every file processed +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown--dereference'\fB\-\-dereference\fP\X'tty: link' +affect the referent of each symbolic link (this is +the default), rather than the symbolic link itself +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown-h'\fB\-h, \-\-no\-dereference\fP\X'tty: link' +affect symbolic links instead of any referenced file; +useful only on systems that can change the ownership of a symlink +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown--from'\fB\-\-from=CURRENT_OWNER:CURRENT_GROUP\fP\X'tty: link' +change the ownership 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 +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown--no-preserve-root'\fB\-\-no\-preserve\-root\fP\X'tty: link' +do not treat '/' specially (the default) +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown--preserve-root'\fB\-\-preserve\-root\fP\X'tty: link' +fail to operate recursively on '/' +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown--reference'\fB\-\-reference=RFILE\fP\X'tty: link' +use RFILE's ownership rather than specifying values. +RFILE is always dereferenced if a symbolic link. +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown-R'\fB\-R, \-\-recursive\fP\X'tty: link' +operate on files and directories recursively +.PP +The following options modify how a hierarchy is traversed when the \fB\-R\fR +option is also specified. If more than one is specified, only the final +one takes effect. \fB\-P\fR is the default. +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown-H'\fB\-H\fP\X'tty: link' +if a command line argument is a symlink to a directory, traverse it +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown-L'\fB\-L\fP\X'tty: link' +traverse every symbolic link to a directory encountered +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#chown-P'\fB\-P\fP\X'tty: link' +do not traverse any symbolic links +.TP +\X'tty: link https://www.gnu.org/software/coreutils/chown#chown--help'\fB\-\-help\fP\X'tty: link' +display this help and exit +.TP +\X'tty: link https://www.gnu.org/software/coreutils/chown#chown--version'\fB\-\-version\fP\X'tty: link' +output version information and exit +.PP +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. +.SH EXAMPLES +.TP +chown root /u +Change the owner of /u to "root". +.TP +chown root:staff /u +Likewise, but also change its group to "staff". +.TP +chown \-hR root /u +Change the owner of /u and subfiles to "root". +.SH AUTHORS +Upstream GNU Coreutils documentation authors: +Written by David MacKenzie and Jim Meyering. +.br +Adapted for BNU; the BNU implementation is independent. +.SH "REPORTING BUGS" +Report BNU bugs at <https://github.com/Soccera1/bnu/issues>. +.br +For upstream GNU Coreutils, see <https://www.gnu.org/software/coreutils/>. +.SH COPYRIGHT +Copyright \(co 2026 Free Software Foundation, Inc. +.br +This manual page was adapted for BNU in 2026. +License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. +.br +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +.SH "SEE ALSO" +\fBchown\fP(2) +.PP +.br +Upstream documentation <https://www.gnu.org/software/coreutils/chown> +.br +BNU documentation is available locally via: info \(aq(bnu) chown invocation\(aq |
