diff options
| author | Soccera1 <[email protected]> | 2026-07-28 15:54:54 +1000 |
|---|---|---|
| committer | Soccera1 <[email protected]> | 2026-07-28 15:54:54 +1000 |
| commit | 6a2f098e72e71437154ec00506e8e736aa8e1026 (patch) | |
| tree | 63e9f5596be38558dbeb40bb566735759a3ccabb /man/rm.1 | |
| parent | a753f669c9bedfccb9f7f400da018bb487dca5d0 (diff) | |
| download | bnu-6a2f098e72e71437154ec00506e8e736aa8e1026.tar.gz bnu-6a2f098e72e71437154ec00506e8e736aa8e1026.zip | |
Add docs
Diffstat (limited to 'man/rm.1')
| -rw-r--r-- | man/rm.1 | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/man/rm.1 b/man/rm.1 new file mode 100644 index 0000000..cf978f6 --- /dev/null +++ b/man/rm.1 @@ -0,0 +1,119 @@ +.\" Adapted for BNU from the GNU Coreutils 9.11 manual page; see doc/README.md. +.TH RM "1" "2026-07-28" "BNU 9.11" "BNU Commands" +.SH NAME +rm \- remove files or directories +.SH SYNOPSIS +.B rm +[\fI\,OPTION\/\fR]... [\fI\,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 rm . +.B rm +removes each specified file. By default, it does not remove +directories. +.P +If the \fI\-I\fR or \fI\-\-interactive=once\fR option is given, +and there are more than three files or the \fI\-r\fR, \fI\-R\fR, +or \fI\-\-recursive\fR are given, then +.B rm +prompts the user for whether to proceed with the entire operation. If +the response is not affirmative, the entire command is aborted. +.P +Otherwise, if a file is unwritable, standard input is a terminal, and +the \fI\-f\fR or \fI\-\-force\fR option is not given, or the +\fI\-i\fR or \fI\-\-interactive=always\fR option is given, +.B rm +prompts the user for whether to remove the file. If the response is +not affirmative, the file is skipped. +.SH OPTIONS +.PP +Remove (unlink) the FILE(s). +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#rm-f'\fB\-f, \-\-force\fP\X'tty: link' +ignore nonexistent files and arguments, never prompt +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#rm-i'\fB\-i\fP\X'tty: link' +prompt before every removal +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#rm-I'\fB\-I\fP\X'tty: link' +prompt once before removing more than three files, +or when removing recursively; less intrusive than \fB\-i\fR, +while still giving protection against most mistakes +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#rm--interactive'\fB\-\-interactive[=WHEN]\fP\X'tty: link' +prompt according to WHEN: never, once (\fB\-I\fR), or always (\fB\-i\fR); +without WHEN, prompt always +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#rm--one-file-system'\fB\-\-one\-file\-system\fP\X'tty: link' +when removing a hierarchy recursively, +skip any directory that is on a file system different +from that of the corresponding command line argument +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#rm--no-preserve-root'\fB\-\-no\-preserve\-root\fP\X'tty: link' +do not treat '/' specially +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#rm--preserve-root'\fB\-\-preserve\-root[=all]\fP\X'tty: link' +do not remove '/' (default); +with 'all', reject any command line argument +on a separate device from its parent +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#rm-r'\fB\-r, \-R, \-\-recursive\fP\X'tty: link' +remove directories and their contents recursively +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#rm-d'\fB\-d, \-\-dir\fP\X'tty: link' +remove empty directories +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#rm-v'\fB\-v, \-\-verbose\fP\X'tty: link' +explain what is being done +.TP +\X'tty: link https://www.gnu.org/software/coreutils/rm#rm--help'\fB\-\-help\fP\X'tty: link' +display this help and exit +.TP +\X'tty: link https://www.gnu.org/software/coreutils/rm#rm--version'\fB\-\-version\fP\X'tty: link' +output version information and exit +.PP +By default, rm does not remove directories. Use the \fB\-\-recursive\fR (\fB\-r\fR or \fB\-R\fR) +option to remove each listed directory, too, along with all of its contents. +.PP +Any attempt to remove a file whose last file name component is '.' or '..' +is rejected with a diagnostic. +.PP +To remove a file whose name starts with a '\-', for example '\-foo', +use one of these commands: +.IP +rm \fB\-\-\fR \fB\-foo\fR +.IP +rm ./\-foo +.PP +If you use rm to remove a file, it might be possible to recover +some of its contents, given sufficient expertise and/or time. For greater +assurance that the contents are unrecoverable, consider using \fBshred\fP(1). +.SH AUTHORS +Upstream GNU Coreutils documentation authors: +Written by Paul Rubin, David MacKenzie, Richard M. Stallman, +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" +\fBunlink\fP(1), \fBunlink\fP(2), \fBchattr\fP(1), \fBshred\fP(1) +.PP +.br +Upstream documentation <https://www.gnu.org/software/coreutils/rm> +.br +BNU documentation is available locally via: info \(aq(bnu) rm invocation\(aq |
