楔子
使用shell工具连接Linux,由于没设置编码,导致了创建了带问号的文件,需要删除
[root@hadoop ~]# ls
????? anaconda-ks.cfg install.log install.log.syslog rmjdk.sh
[root@hadoop ~]# ls -i
927118 ????? 927048 anaconda-ks.cfg 912131 install.log 912132 install.log.syslog 927124 rmjdk.sh
[root@hadoop ~]# find . -inum 927118
./?????
[root@hadoop ~]# find . -inum 927118 |xargs rm -rf
[root@hadoop ~]# ls
anaconda-ks.cfg install.log install.log.syslog rmjdk.sh
[root@hadoop ~]#
先根据ID 找出文件,然后删除
ls -i
显示文件id
删除是find . -inum 927118 |xargs rm -rf