读书人

超容易的 shell 批量删除指定文件

发布时间: 2012-07-22 19:31:17 作者: rapoo

超简单的 shell 批量删除指定文件

shell文件 : removeFiles.sh

#!/bin/bash#removeFiles.shcat wait4delfiles.txt | while read mylinedo echo rm -rf $myline rm -rf $mylinedoneecho remove success!

?

wait4delfiles.txt 文件内容:

/usr/nassir/dir/aa.class/usr/nassir/dir/bb.xml/usr/nassir/dir/cc.properties

?

sh 授权命令: chmod 744 removeFiles.sh

创建文件命令: touch aa.class bb.xml cc.properties

?

参照:

?

http://luyafei.blog.51cto.com/1092421/794826

?

http://hi.baidu.com/bluedeman520/blog/item/40754753467cf5998d54302f.html

?

?

读书人网 >操作系统

热点推荐