看板FreeBSD
标 题Re: [接龙] BSD 小技巧分享
发信站小鹿鹿 BBS (Sat Nov 24 19:40:45 2007)
转信站ptt!ctu-reader!news.nctu!abpe.org
※ 引述《[email protected] ( )》之铭言:
> ※ 引述《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/ & <
[email protected]>
--
※ Origin: 邪恶小鹿鹿 <Deer.twbbs.org> ◆ From: 140.113.17.29