Centos框的shell脚本

时间:2014-09-03 19:32:15

标签: shell centos

我是shell脚本的新手,以及如何编写它们。我想编写一个脚本,搜索具有扩展名.test的所有文件的特定目录(/ mydir),然后删除它们。

任何帮助都会非常感激。

1 个答案:

答案 0 :(得分:0)

find /mydir -name '*.test' -delete

Find是一个非常灵活的工具。请参阅man find了解它可以执行的所有操作。