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.zipReference
[1]. Delete garbled files in linux