取消
顯示結果 
搜尋替代 
您的意思是: 

如何使用 dirclean

如何使用 dirclean

假如要刪除 /data 目錄下 3 天以上未曾修改過的檔案, 該如何使用 dirclean 指令來達成?
3 回覆

如何使用 dirclean

If you use hp-ux, pls refer "find" command man page. Ex:

$ find /data -atime +3 -exec rm {} \;

如何使用 dirclean

對Tru64 UNIX而言, 你也可以用find指令, 下面是Tru64

UNIX dirclean 使用範例:

# dirclean -a +4 /var/adm/syslog.dated/

你也可以用

# man dirclean 查看指令選項及例子.



Danny

如何使用 dirclean

Hi ericfj,



From the "man dirclean" description. The answer will be run as below:



# dirclean -a +2 /data.



# man dirclean

.

-a days

Sets the threshold for file removal in terms of the file's

atime (access time). Therefore, +1 means that files that were

last accessed at least 48 hours before dir-clean processing

will be removed. Specifying -1 means that files accessed less

than 24 hours before dirclean processing will be removed, and

1 means files that were last accessed at least 24 hours ago

but less than 48 hours ago will be removed.



Hope it helpful to you!

Richard.