討論串[問題] 刪除30天未動的檔案(排除例外目錄)
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 5→)留言5則,0人參與, 最新作者changyuheng (張昱珩)時間11年前 (2013/08/26 15:18), 編輯資訊
0
0
0
內容預覽:
find /home -wholename /home/pkg -prune -o -wholename /home/file -prune \. -o -name .ssh -type d -prune -o -name bin -type d -prune \. -o -type f -atim

推噓0(0推 0噓 1→)留言1則,0人參與, 最新作者s6414073時間11年前 (2013/08/23 17:58), 編輯資訊
0
0
0
內容預覽:
find /home -type f -atime +30 -delete. 網路上找到的大致上就是這個指令 把他寫在crontab內. 但我有特殊需求 不知道怎麼下手. 想來板上問一下大家. /home目錄內有 pkg 和 file 這兩個目錄. 其中 pkg 和 file 目錄內的檔案都不要刪除
(還有20個字)
首頁
上一頁
1
下一頁
尾頁