Remove file name garbled files under CentOS

Source: Internet
Author: User

The RM command is used to delete files under CentOS, but if you want to delete files with garbled file names, you cannot use the RM command directly, because you cannot output a file name at all. However, the Find command enables you to delete it. Under Linux for each file is a corresponding invariant inode number, using Ls-li can see the inode number of the file, and find can be found according to the inode number, in addition to the Find command can execute other commands. The steps to remove are as follows:

  1. Get the inode number to delete the garbled file name by Ls-li, for example, 123456

  2. Perform the Delete

Find./-inum 123456-exec RM-RF {} \;

Note:"{}" should be empty after adding "\;".

Remove file name garbled files under CentOS

Related Article

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.