Linux Common Commands--rm

Source: Internet
Author: User
rm 复制文件或目录

Syntax format: RM "option" "File" rm [options] [file]
Note: The RM command and the following options and file directories must have at least one space between each element
Option Description:

parameter Options Explanatory notes
-F Force Delete, ignore nonexistent files, do not prompt for confirmation
-R Recursively delete a directory and its contents

About Delete:

  1. Use MV instead of RM, do not worry about deleting, but first move to recycle Bin/tmp
  2. Be sure to back up before deleting, preferably a different machine backup, there are problems can be restored at any time
  3. If the non-drug is removed, then use Find instead of RM, including cleaning up the file method through the System timer task
    You can use the following more secure methods:
  4. If you do not want to delete through the RM command, then please switch directories in the delete, you can not use wildcard characters without wildcards. The deletion of the file prohibits the use of "RM-FR file name" because "RM-FR" mistakenly deletes the directory is not prompted, very dangerous, up to use "rm-f filename", recommended "RM file name"
  5. If you want to use a wildcard character, follow these methods

    * Add "./", if "" in the deletion process preceded by a space, will delete the directory below the current directory * *

Linux Common Commands--rm

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.