Commit on 2025/03/24 周一 16:04:56.71
This commit is contained in:
parent
46b79a40cb
commit
c6f87f0fce
@ -251,8 +251,7 @@ bid-assistance/test 里面找个文件的url,推荐'094定稿-湖北工业大
|
||||
|
||||
### 清理服务器上的文件夹
|
||||
|
||||
1. 编写shell文件,sudo vim clean_dir.sh
|
||||
命名为clean_dir.sh
|
||||
**1.编写shell文件**,sudo vim clean_dir.sh
|
||||
|
||||
清理/home/Z/zbparse_output_dev下的output1这些二级目录下的c8d2140d-9e9a-4a49-9a30-b53ba565db56这种uuid的三级目录(只保留最近7天)。
|
||||
|
||||
@ -279,19 +278,19 @@ echo "清理完成。"
|
||||
|
||||
```
|
||||
|
||||
2. 添加权限。
|
||||
**2.添加权限。**
|
||||
|
||||
```text
|
||||
sudo chmod +x ./clean_dir.sh
|
||||
```
|
||||
|
||||
3. 执行
|
||||
**3.执行**
|
||||
|
||||
```text
|
||||
sudo ./clean_dir.sh
|
||||
```
|
||||
|
||||
4. 以 root 用户的身份编辑 crontab 文件,从而设置或修改系统定时任务(cron jobs)。每天零点10分清理
|
||||
**以 root 用户的身份编辑 crontab 文件**,从而设置或修改系统定时任务(cron jobs)。每天零点10分清理
|
||||
|
||||
```text
|
||||
sudo crontab -e
|
||||
|
1253
Java/草稿.md
1253
Java/草稿.md
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user