13

根据文件大小删除一个特殊文件名的文件

 3 years ago
source link: https://blogread.cn/it/article/2716?f=hot1
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
您现在的位置首页 --> 系统运维 --> 根据文件大小删除一个特殊文件名的文件

根据文件大小删除一个特殊文件名的文件

浏览:1492次  出处信息
文件名为不可见字符,不太好删除,使用find命令找出来,是用exec来删除,找文件的办法有多种,这里根据文件的大小来找。

    ls -l 显示的文件大小的单位是字节。 find的size的单位默认为block,可以使用c来说明是字节,如下:

    find . -size +22156c -exec  rm {} \;

    如果find命令不熟悉的话,就不要这么写了,不如先把其他文件移走,删除目录,然后再创建目录,在移动回来,这样要快的多哦

觉得文章有用?立即:

和朋友一起 共学习 共进步!

建议继续学习:

QQ技术交流群:445447336,欢迎加入!
扫一扫订阅我的微信号:IT技术博客大学习
Loading...

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK