网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 服务器与数据库 > Linux
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

Reply
 
Thread Tools Display Modes
  #1   IP: 153.99.37.70
Old 2015-10-23, 01:34 PM
Kai Kai is offline
初级会员
 
Join Date: 2008-05-27
Posts: 1
Kai 现在声名狼藉
Default Centos下删除文件名乱码文件

centos下通过rm命令来删除文件,但是如果要删除文件名乱码的文件,就不能直接使用rm命令了,因为压根就无法输出文件名来。不过借助find命令可以实现对其删除。在linux下对于每个文件都一个对应的不变的inode号,使用 ls -li 可以查看到文件的inode号,同时find可以根据inode号来查找,另外find命令中可以执行其他的命令。删除的步骤如下:

1.通过ls -li 获取要删除乱码文件名文件的inode号,比如得到的是 123456


2.执行删除
Code:
find ./ -inum 123456 -exec rm -rf {} \;
注意:“{}”后要空一格再加上“\;”。
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 10:46 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.