Linux--RM, rmdir

Source: Internet
Author: User

RM (1) User Commands RM (1)



NAME
Rm-remove Files or directories

Synopsis
RM [OPTION] ... FILE ...

DESCRIPTION
This manual page documents the GNU version of RM. RM removes each
Specified file. By default, it does not remove directories.

If the-i or--interactive=once option is given, and there was more
than three files or the-r,-R, or--recursive is given, then RM
Prompts the user for whether to proceed with the entire operation. If
The response is not affirmative, and the entire command is aborted.

Otherwise, if a file is unwritable, standard input is a terminal, and
The-f or--force option is not given, or the-i or--interac‐
Tive=always option is given, RM prompts the user for whether to remove
The file. If The response is not a affirmative, the file is skipped.

OPTIONS
Remove (unlink) the FILE (s).

**********************************************************************************************************

-F,--force
Ignore nonexistent files and arguments, never prompt
#不进行询问 (default), Force delete


-I prompt before every removal

#删除之前进行询问, ask once for each file you delete

-I prompt once before removing more than three files, or when
removing recursively. Less intrusive than-i, while still giv‐
ing protection against most mistakes
#当删除文件超过三个以上时进行询问


--interactive[=when]
Prompt according to When:never, once (-i), or always (-i).
Without when, prompt

#是否进行询问, once or every time

***********************************************************************************************************


-R,-R,--recursive
Remove directories and their contents recursively

-D,--dir
Remove Empty directories

-V,--verbose
Explain what's being done

************************************************************************************************************ *

      --one-file-system
               when  removing  A hierarchy recursively, skip any directory that
              is on a file system different from   that  of  the  corresponding
               Command line argument

#跳过其他文件系统, has an important role for multi-file systems

--no-preserve-root
Do not treat '/' specially

--preserve-root
Do not remove '/' (default)


--help Display this Help and exit

--version
Output version information and exit

By default, RM does not remove directories. Use the--recursive (-R or
-r) option to remove each listed directory, too, along with all of its
Contents.


to remove a file whose name starts with a '-', for example '-foo ', use
One of these commands:

RM---Foo

rm./-foo#删除开头为 "-" File =_+

Note If you use RM to remove a file, it might is possible to
Recover some of its contents, given sufficient expertise and/or time.
For greater assurance that the contents is truly unrecoverable, con‐
Sider using shred.

AUTHOR
Written by Paul Rubin, David MacKenzie, Richard M. Stallman, and Jim
Meyering.

REPORTING BUGS
Report RM bugs to [email protected]
GNU coreutils Home page: General help using GNU software: Report RM translation Bugs to
COPYRIGHT
copyright©2013 Free Software Foundation, Inc. License gplv3+: GNU
GPL version 3 or later This was free software:you was free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

See ALSO
Unlink (1), unlink (2), chattr (1), shred (1)

The full documentation-RM is maintained as a Texinfo manual. If
The info and RM programs is properly installed at your site, the com‐
Mand

Info coreutils ' RM invocation '

Should give you access to the complete manual.



GNU coreutils 8.21 March RM (1)

############################################################################################

############################################################################################

RMDIR (1) User Commands RMDIR (1)



NAME
Rmdir-remove Empty Directories #单独拿出来删除一个空目录

Synopsis
rmdir [OPTION] ... DIRECTORY ...

DESCRIPTION
Remove the DIRECTORY (ies), if they is empty.

--ignore-fail-on-non-empty

Ignore each failure this is solely because a directory

Is Non-empty

-P,--parents
Remove DIRECTORY and its ancestors; e.g., ' Rmdir-p a/b/c ' is
Similar to ' rmdir a/b/c A/b '

#连带删除父目录

-V,--verbose
Output a diagnostic for every directory processed

--help Display this Help and exit

--version
Output version information and exit

AUTHOR
Written by David MacKenzie.

REPORTING BUGS
Report RmDir bugs to [email protected]
GNU coreutils Home page: General help using GNU software: Report RmDir translation Bugs to
COPYRIGHT
copyright©2013 Free Software Foundation, Inc. License gplv3+: GNU
GPL version 3 or later This was free software:you was free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

See ALSO
RmDir (2)

The full documentation-RMDIR is maintained as a Texinfo manual. If
The info and RMDIR programs is properly installed at your site, the
Command

Info coreutils ' rmdir invocation '

Should give you access to the complete manual.



GNU coreutils 8.21 March RMDIR (1)

!!!!!!!!!!!!!!!!!!!!!!!!

1 #rm-D target.d234 above are only available to delete empty directories

Linux--RM, rmdir

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.