最近把一些客户数据通过scp上传到阿里的服务器,结果解压后发现目录全是中文名,我们的服务器不支持中文显示和输入,所以文件夹名是一串问号,想进去或者直接删除都不行。Google之后发现了一个办法不错,mark并分享一下。
Remove file by an inode number
The -i option to ls displays the index number (inode) of each file:
ls -li
Use find command as follows to delete the file if the file has inode number 4063242:
$ find . -inum 4063242 -delete
OR
$ find . -inum 4063242 -exec rm -i {} ;