man-pages/man1/rm.1.html
2021-03-31 01:06:50 +01:00

160 lines
5.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of RM</TITLE>
</HEAD><BODY>
<H1>RM</H1>
Section: User Commands (1)<BR>Updated: September 2019<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
rm - remove files or directories
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>rm</B>
[<I>,OPTION/</I>]... [<I>,FILE/</I>]...
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
This manual page
documents the GNU version of
<B>rm</B>.
<B>rm</B>
removes each specified file. By default, it does not remove
directories.
<P>
If the <I>-I</I> or <I>--interactive=once</I> option is given,
and there are more than three files or the <I>-r</I>, <I>-R</I>,
or <I>--recursive</I> are given, then
<B>rm</B>
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 <I>-f</I> or <I>--force</I> option is not given, or the
<I>-i</I> or <I>--interactive=always</I> option is given,
<B>rm</B>
prompts the user for whether to remove the file. If the response is
not affirmative, the file is skipped.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<P>
Remove (unlink) the FILE(s).
<DL COMPACT>
<DT id="1"><B>-f</B>, <B>--force</B><DD>
ignore nonexistent files and arguments, never prompt
<DT id="2"><B>-i</B><DD>
prompt before every removal
<DT id="3"><B>-I</B><DD>
prompt once before removing more than three files, or
when removing recursively; less intrusive than <B>-i</B>,
while still giving protection against most mistakes
<DT id="4"><B>--interactive</B>[=<I>,WHEN/</I>]<DD>
prompt according to WHEN: never, once (<B>-I</B>), or
always (<B>-i</B>); without WHEN, prompt always
<DT id="5"><B>--one-file-system</B><DD>
when removing a hierarchy recursively, skip any
directory that is on a file system different from
that of the corresponding command line argument
<DT id="6"><B>--no-preserve-root</B><DD>
do not treat '/' specially
<DT id="7"><B>--preserve-root</B>[=<I>,all/</I>]<DD>
do not remove '/' (default);
with 'all', reject any command line argument
on a separate device from its parent
<DT id="8"><B>-r</B>, <B>-R</B>, <B>--recursive</B><DD>
remove directories and their contents recursively
<DT id="9"><B>-d</B>, <B>--dir</B><DD>
remove empty directories
<DT id="10"><B>-v</B>, <B>--verbose</B><DD>
explain what is being done
<DT id="11"><B>--help</B><DD>
display this help and exit
<DT id="12"><B>--version</B><DD>
output version information and exit
</DL>
<P>
By default, rm does not remove directories. Use the <B>--recursive</B> (<B>-r</B> or <B>-R</B>)
option to remove each listed directory, too, along with all of its contents.
<P>
To remove a file whose name starts with a '-', for example '-foo',
use one of these commands:
<DL COMPACT>
<DT id="13"><DD>
rm <B>--</B> <B>-foo</B>
<DT id="14"><DD>
rm ./-foo
</DL>
<P>
Note that 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 truly unrecoverable, consider using shred.
<A NAME="lbAF">&nbsp;</A>
<H2>AUTHOR</H2>
Written by Paul Rubin, David MacKenzie, Richard M. Stallman,
and Jim Meyering.
<A NAME="lbAG">&nbsp;</A>
<H2>REPORTING BUGS</H2>
GNU coreutils online help: &lt;<A HREF="https://www.gnu.org/software/coreutils/">https://www.gnu.org/software/coreutils/</A>&gt;
<BR>
Report rm translation bugs to &lt;<A HREF="https://translationproject.org/team/">https://translationproject.org/team/</A>&gt;
<A NAME="lbAH">&nbsp;</A>
<H2>COPYRIGHT</H2>
Copyright &#169; 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;<A HREF="https://gnu.org/licenses/gpl.html">https://gnu.org/licenses/gpl.html</A>&gt;.
<BR>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
<A NAME="lbAI">&nbsp;</A>
<H2>SEE ALSO</H2>
<A HREF="/cgi-bin/man/man2html?1+unlink">unlink</A>(1), <A HREF="/cgi-bin/man/man2html?2+unlink">unlink</A>(2), <A HREF="/cgi-bin/man/man2html?1+chattr">chattr</A>(1), <A HREF="/cgi-bin/man/man2html?1+shred">shred</A>(1)
<P>
<BR>
Full documentation at: &lt;<A HREF="https://www.gnu.org/software/coreutils/rm">https://www.gnu.org/software/coreutils/rm</A>&gt;
<BR>
or available locally via: info '(coreutils) rm invocation'
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="15"><A HREF="#lbAB">NAME</A><DD>
<DT id="16"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="17"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="18"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="19"><A HREF="#lbAF">AUTHOR</A><DD>
<DT id="20"><A HREF="#lbAG">REPORTING BUGS</A><DD>
<DT id="21"><A HREF="#lbAH">COPYRIGHT</A><DD>
<DT id="22"><A HREF="#lbAI">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:26 GMT, March 31, 2021
</BODY>
</HTML>