linux下刪除特殊字符中文亂碼文件方法

標記一下ide

 

[root@lvsmaster ~]# llspa

總用量 44it

drwxr-xr-x. 3 root root  4096  5月 29 07:26 」ast

-rw-------. 1 root root  1372  5月 28 07:37 anaconda-ks.cfgclass

-rw-r--r--. 1 root root 18796  5月 28 07:37 install.log亂碼

-rw-r--r--. 1 root root  4877  5月 28 07:35 install.log.syslogdi

-rw-r--r--. 1 root root   795 10月 25 15:02 sys.sh文件

 

 

莫名其妙出現這樣的目錄lvs

drwxr-xr-x. 3 root root  4096  5月 29 07:26 」view

怎樣刪除呢?只能經過節點去刪除特殊字符或者亂碼文件

 

[root@lvsmaster ~]# ll -i

總用量 44

5636107 drwxr-xr-x. 3 root root  4096  5月 29 07:26 」

5636105 -rw-------. 1 root root  1372  5月 28 07:37 anaconda-ks.cfg

5636098 -rw-r--r--. 1 root root 18796  5月 28 07:37 install.log

5636099 -rw-r--r--. 1 root root  4877  5月 28 07:35 install.log.syslog

5636138 -rw-r--r--. 1 root root   795 10月 25 15:02 sys.sh

 

[root@lvsmaster ~]# find ./ -inum 5636107 |xargs rm -rf

或者使用 

[root@lvsmaster ~]# find ./ -inum  5636107  -print -exec rm {} -rf \;

[root@lvsmaster ~]# ll

總用量 40

-rw-------. 1 root root  1372  5月 28 07:37 anaconda-ks.cfg

-rw-r--r--. 1 root root 18796  5月 28 07:37 install.log

-rw-r--r--. 1 root root  4877  5月 28 07:35 install.log.syslog

-rw-r--r--. 1 root root   795 10月 25 15:02 sys.sh

 

對於一些比較簡單的字符或者亂碼字符能夠用rm *的方式刪除須要刪除的文件

 

若是帶有-a符號的目錄或者文件,能夠 rm -- -a或者rm ./-a

相關文章
相關標籤/搜索