当前位置:网站首页>宝塔计划任务Shell脚本定时删除某各目录下所有文件【记录】
宝塔计划任务Shell脚本定时删除某各目录下所有文件【记录】
2022-06-10 22:17:00 【于飞SEO】
此命令可定时清理缓存,是为解决某些网站程序runtime文件夹下缓存过多过大问题。

第一种
此命令会把runtime文件夹下所有文件以及runtime文件夹本身全部删除

命令如下:
rm -rfv /www/wwwroot/ym.ws58.net/runtime第二种
此命令会把runtime文件夹下所有文件以及runtime文件夹本身全部删除
命令如下:
find /www/wwwroot/ym.ws58.net/runtime/ | xargs rm -rf第三种
此命令只删除runtime文件夹下所有文件,但不删除最外层的runtime文件夹
命令如下:
rm -rf /www/wwwroot/ym.ws58.net/runtime/*本文部分内容来源于网络,转载请注明来源,如需投诉请联系我们[email protected]
边栏推荐
- 数据与信息资源共享平台(九)
- untiy 重置动画
- Ribbon load balancing policy
- Assembly: assembly mixed with c-faction language and corresponding lldb common instructions
- Creation of thread pool
- Basic SQL statement - insert
- 执行Oracle的SQL语句报错【ORA-00904: “CREATETIME“: 标识符无效】、【ORA-00913: 值过多】解决办法
- C语言创建动态二维数组
- ICML2022 | 从零开始重新审视端到端的语音到文本翻译
- 30 frequently asked questions of 2022 latest software test interview questions [continuous update ~]
猜你喜欢

Introduction to Wireshark capturing RTP load TS stream (UDP multicast)

Icml2022 | reexamine end-to-end voice to text translation from scratch

Sealem Finance - a new decentralized financial platform based on Web3

爬虫学习知识

样板小作坊

Is it too late to teach yourself programming at 28? Is it reliable?

软件测试入门之软件测试的概念与过程(精辟内容)

数据与信息资源共享平台(七)

About not being able to create a new package under Src in idea

Data and information resource sharing platform (IV)
随机推荐
Introduction to software testing: the concept and process of software testing (brilliant content)
云图说|每个成功的业务系统都离不开APIG的保驾护航
Wireshark抓取rtp负载ts流介绍(UDP组播)
unity 代码为动画注册事件
Executor - Shutdown、ShutdownNow、awaitTermination 详解与实战
司空见惯 - 大哲学家康德的作息时间表
聚簇索引和非聚簇索引
Assembly: assembly mixed with c-faction language and corresponding lldb common instructions
DependencyManagement 和 Dependencies
HALCON联合C#检测表面缺陷——仿射变换(二)
What are the restrictions on opening futures accounts? Where is the safest?
0223-总结
Ribbon负载均衡策略
关于嵌入式音频开发需要注意的两个方面
LeetCode+ 16 - 20
Pulling method of common webcam
Kotlin语言现在怎么不火了?
MySQL相关-0416
MySQL组合索引不被命中使用的情况
ICML2022 | 从零开始重新审视端到端的语音到文本翻译