In Linux, how does one Delete garbled files ?, Delete garbled files in linux

Source: Internet
Author: User

In Linux, how does one Delete garbled files ?, Delete garbled files in linux
Question

I wonder if you have encountered such a file. The file cannot be deleted due to garbled characters. In this case, we can use the following command to delete the file or directory.

Ls-I // list file nodes

Find./-inum XXX (node number)-print-exec rm-rf {}\; // Delete the node number File

Find.-inum XXXX (node number)-exec mv {} file.txt \; // in fact, we can also execute this command to change the garbled file name to a normal file name.

Solution
[root@ora9i installation]# ls -li total 1307844 1343491 -rw-r--r--  1 root root 423559952 Sep 14  2012 amd64_db_9204_Disk1.cpio.gz 1343492 -rw-r--r--  1 root root 578948873 Sep 14  2012 amd64_db_9204_Disk2.cpio.gz 1392641 -rw-r--r--  1 root root 334834987 Sep 14  2012 amd64_db_9204_Disk3.cpio.gz 1490946 -rw-r--r--  1 root root    225374 Jun  2 02:55 p2617419_220_GENERIC.zip 1622017 -rw-r--r--  1 root root    286639 Jun  2 02:55 p3238244_9204_LINUX.zip 1622018 -rw-r--r--  1 root root      5814 Jun  2 02:55 p4198954_40_linux.zip 1490945 -rwxrwxrwt  1 root root         0 Jan  1  1970 RBh?????^??^???PB??!?l???9??????s??????y???9`??k?E??~?V6??#Xh???({???????Q??????>???wJ?}a?A)??_yS [root@ora9i installation]# find . -inum 1490945 -exec rm {} -rf \;        [root@ora9i installation]# ll total 1307840 -rw-r--r--  1 root root 423559952 Sep 14  2012 amd64_db_9204_Disk1.cpio.gz -rw-r--r--  1 root root 578948873 Sep 14  2012 amd64_db_9204_Disk2.cpio.gz -rw-r--r--  1 root root 334834987 Sep 14  2012 amd64_db_9204_Disk3.cpio.gz -rw-r--r--  1 root root    225374 Jun  2 02:55 p2617419_220_GENERIC.zip -rw-r--r--  1 root root    286639 Jun  2 02:55 p3238244_9204_LINUX.zip -rw-r--r--  1 root root      5814 Jun  2 02:55 p4198954_40_linux.zip
Reference

[1]. Delete garbled files in linux

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.