New for Linux RM delete instructions

Source: Internet
Author: User

Recently in the Tutor write network bandwidth allocation simulation program, during the generation of a large number of temporary files, how to use RM instructions to delete these temporary files without deleting other specific files?

For example, the following is a temporary file:

temp101 temp102 temp103 temp104 temp105

temp201 temp202 temp203 temp204 temp205

temp301 temp302 temp303 temp304 temp305

temp401 temp402 temp403 temp404 temp405

temp501 temp502 temp503 temp504 temp505


There are also files in the same directory that you want to keep:

Temp10

Temp20

Temp30

Temp40

Temp50

This requires the use of the RM instruction and the character set in the regular expression

RM-RF Temp[1-5]0[1-5]

In regular expressions you can use character groups to match some characters, [] character groups represent one character



Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

New for Linux RM delete instructions

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.