Linux如何刪除一些亂碼命名的文件

工作中碰到幾次類似問題,現總結下解決方案,以備後用:

$ ls
??????????_??????b6?S??.a  test.war.bk  test.war.bk1  ??z?2??F?
[test@testPC /home/test]
$ ls -liaha
total 11M
397163 drwxr-xr-x 3 deploy deploy 4.0K May  8 09:09 .
397160 drwxr-xr-x 4 root   root   4.0K May 23  2014 ..
398445 -rw-rw-r-- 1 test  test0 May  8 09:09 ??????????_??????b6?S??.a
398357 -rw-r--r-- 1 test  test  5.4M May  5 11:05 test.war.bk
397113 -rw-r--r-- 1 test  test   5.4M May  8 09:08 test.war.bk1
397034 -rw-rw-r-- 1 test  test  0 May  8 09:09 ??z?2??F?
[test@testPC/var/www/webapps]
$ find . -inum 398445 -exec rm {} -rf \;
                                                        ==》 Comment: 通過索引結點號找到文件並刪除


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章