Linux使用ShellScripts刪除檔案
Linux使用ShellScripts刪除檔案
先建立Shell Scripts檔案
1 | $ touch clearLog.sh |
對.sh檔案編輯
1 | $ vim clearLog.sh |
按INSERT來新增內容
1 | # remove 10 to 100 days ago logs |
存檔指令
1 | :wq |
用crontab設定排程
1 | 編輯 |
先建立Shell Scripts檔案
1 | $ touch clearLog.sh |
對.sh檔案編輯
1 | $ vim clearLog.sh |
按INSERT來新增內容
1 | # remove 10 to 100 days ago logs |
存檔指令
1 | :wq |
用crontab設定排程
1 | 編輯 |