Re: delelte dirs older than 2 hours by find with solaris 9



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.
.



Relevant Pages