Re: [接龍] BSD 小技巧分享

看板FreeBSD作者時間16年前 (2007/11/24 20:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串17/26 (看更多)
※ 引述《concore.bbs@ptt.cc ( )》之銘言: > ※ 引述《dingyuchi (fish)》之銘言: > : #刪除90天前建立的檔案 > : find ./ -mtime +90 -maxdepth 1 | xargs rm -rf > 改用 > find ./ -mtime +90 -maxdepth 1 -exec rm -rf {} \; > 會不會比較好?! 在 FreeBSD 下可以用 -delete,比較省資源。 -delete Delete found files and/or directories. Always returns true. This executes from the current working directory as find recurses down the tree. It will not attempt to delete a filename with a ``/'' character in its pathname relative to ``.'' for security reasons. Depth-first traversal processing is implied by this option. -- Resistance is futile. http://blog.gslin.org/ & <gslin@gslin.org> -- ※ Origin: 邪惡小鹿鹿 <Deer.twbbs.org> ◆ From: 140.113.17.29
文章代碼(AID): #17I19_00 (FreeBSD)
討論串 (同標題文章)
文章代碼(AID): #17I19_00 (FreeBSD)