Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Files older than 1 Day

Status
Not open for further replies.

TSch

Technical User
Jul 12, 2001
557
DE
Hi folks,

I'm trying to automatically (via crontab) delete all files in a specific folder, that are older than one day ...
How can I do this ?

Regards,
Thomas
 
Hi Thomas,

why not use find ?

find /tmp -mtime 1 -exec rm{} \;

this works on solaris, i do not know the exact sysntax on aix, but look in
man find
for it
hth
 
Yeah, that find command will work on AIX.

Is this something you want to happen regularly? If so, why not consider skulker?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top