Linux delete garbled files (reproduced)

Some garbled files cannot be managed by ordinary rm commands.
It can be deleted by deleting the i-node.

[root@192_168_100_35 musicwap]# ls
??,?K?k?ͨa*.?J]?k?Φ??P???Z?b?A?R???X??u??.? ????*H@B?T???xS*<?X?h??N?TR4˫?!?H
Check the i node of the garbled file
[root@192_168_100_35 musicwap]# ls -liaha
54263996 -rw -rw-r-- 1 musicwap musicwap 0 Sep 20 16:57 ??,?K?k?ͨa*.?J]?k?Φ??P???Z?b?A?R???X ??u??.?????*H@B?T???xS*<?X?h??N?TR4˫?!?H

Use the find command to find the file and delete it
[root@192_168_100_35 musicwap]# find . -inum 54263996 -exec rm {} -rf \;
[root@192_168_100_35 musicwap]# ls -a
. ..
is now removed.
 
Original address: http://blog.chinaunix.net/uid-21142030-id-2888162.html

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326780826&siteId=291194637