Linux RM commands

Source: Internet
Author: User

Rm command:Delete a file or directory

First man RM

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 a file is unwritable, the standard input is a tty, and the-f or -- force option is not given, RM prompts the user for whether
Remove the file. If the response is not affirmative, the file is skipped.

Options
Remove (unlink) the file (s ).

-F, -- force
Ignore nonexistent files, never prompt

-I, -- interactive
Prompt before any removal

-- No-preserve-root do not treat '/'specially (the default)

-- Preserve-Root
Fail to operate recursively on '/'

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

-V, -- verbose
Explain what is being done

-- 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
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

Rm-RF jaxb-xjc.jar

Rm-rfv jboss-aop-asintegration-core.jar

Deleted jboss-aop-asintegration-core.ja

Rm-rfvi jboss-aop-asintegration-jmx.jar

RM: Do you want to delete the general file "jboss-aop-asintegration-jmx.jar "? Y
Deleted jboss-aop-asintegration-jmx.jar"

Rm-RFI jboss-aop-asintegration-mc.jar

RM: Do you want to delete the general file "jboss-aop-asintegration-mc.jar "? Y

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.