The RM for common Linux commands

Source: Internet
Author: User

RM: Delete

1> function: Delete files or directories

2> use format:RM [OPTION] ... FILE ...

3> Parameters:

-f:force Force Delete, do not appear warning letter, ignore the nonexistent file;

-I: Delete prompt

-R: Recursive delete, commonly used in delete directory, all files in the specified directory are deleted

4> Example:

Example 1. Delete the file, the system uses an alias, so the default RM with the-I parameter

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7A/02/wKioL1aglz7D9r84AAAQozXojXg386.png "title=" Qq20160121162942.png "alt=" Wkiol1aglz7d9r84aaaqozxojxg386.png "/>


Example 2. Remove all files by using wildcards * All file names begin with, or end with,

Because the default every file will appear delete prompt, too much trouble, we can use \rm ba* ignore delete

Tips

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7A/02/wKioL1agmJWzvEoIAAAhbap056I785.png "title=" Qq20160121163524.png "alt=" Wkiol1agmjwzveoiaaahbap056i785.png "/>

Example 3. Deleting a directory

Delete the directory directly using RmDir, only delete the empty directory, the directory is not empty \rm-r directories

The previous example tells the \rm to ignore the delete prompt

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7A/02/wKioL1agm5qhRCkxAAAjzRLe0FQ310.png "title=" Qq20160121164817.png "alt=" Wkiol1agm5qhrckxaaajzrle0fq310.png "/>


Be careful when using the/RM-R command!



This article is from the "11117200" blog, please be sure to keep this source http://11127200.blog.51cto.com/11117200/1737285

The RM for common Linux commands

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.