Re: delelte dirs older than 2 hours by find with solaris 9
- From: Oscar del Rio <delrio@xxxxxxxxxxxxxxx>
- Date: Mon, 27 Nov 2006 15:47:37 -0500
Frank Schmitz wrote:
I run Solaris 9 and want to delete some directories older than 2
hours.
Create a timestamp file that is 2 hours old, using TZ tricks, like
touch -t `TZ=GMT+3 date '+%y%m%d%H%M'` .TIMESTAMP
find /dir -type d \! -newer .TIMESTAMP .....
The environ(5) man page has details about the TZ format.
You might have to compensate for std vs dst timezones.
.
- References:
- delelte dirs older than 2 hours by find with solaris 9
- From: Frank Schmitz
- delelte dirs older than 2 hours by find with solaris 9
- Prev by Date: Re: delelte dirs older than 2 hours by find with solaris 9
- Next by Date: Re: delelte dirs older than 2 hours by find with solaris 9
- Previous by thread: Re: delelte dirs older than 2 hours by find with solaris 9
- Next by thread: Postfix just for sending mail, forwarding to another MTA
- Index(es):
Relevant Pages
|