Aug 23, 2001 #1 Guest_imported New member Joined Jan 1, 1970 Messages 0 I want a script which will delete files which are older than 10 days from a directory. Any help is appreciated. Newbie.
I want a script which will delete files which are older than 10 days from a directory. Any help is appreciated. Newbie.
Aug 23, 2001 #2 CaKiwi Programmer Joined Apr 8, 2001 Messages 1,294 Location US Try find /usr/dir -type f -ctime +10 -exec rm -f {} \; Also do man on find and look at the -atime expression. Hope this helps. CaKiwi After all is said and done, a lot more will have been said than done. Upvote 0 Downvote
Try find /usr/dir -type f -ctime +10 -exec rm -f {} \; Also do man on find and look at the -atime expression. Hope this helps. CaKiwi After all is said and done, a lot more will have been said than done.