http://my.oschina.net/letiantian/blog/486376
http://blog.csdn.net/loveheronly/article/details/46350593
递归删除当前目录中shell脚本:
find . -type f -name '*.sh' | xargs rm
递归删除当前目录中非shell脚本:
find . -type f -not -name '*.sh' | xargs rm
find . -type f -name '*.swp' | xargs rm
find . -type f -name '*.swo' | xargs rm
find . -type f -name '*.swn' | xargs rm
find . -type f -name '*.swk' | xargs rm
find . -type f -name '*.swl' | xargs rm
find . -type f -name '*.swm' | xargs rm
crontab 问题, 如何查看是否正确执行
http://bbs.chinaunix.net/thread-2139094-1-1.html
* * * * * /tmp/xxx.sh >>/tmp/test.log 2>&1
本文介绍如何使用Shell脚本结合find和xargs命令来批量删除指定类型的文件,例如shell脚本或其缓存文件。此外,还讨论了如何设置crontab任务来监控这些操作的执行情况,确保系统的整洁与高效。
97万+

被折叠的 条评论
为什么被折叠?



