On Mon, 2003-06-30 at 13:41, Jeremy Browne wrote:
> I've set up a Samba share called "temp", and I mean it! I want to run a 
> script in my crontab that rm -R * every night at midnight. However, I 
> thought I 'd get fancy and just rm things that are older than 24 hours. Any 
> ideas on what that would look like?

find /mnt/samba/temp -type f -mtime +1| xargs rm
find /mnt/samba/temp -type d -empty | xargs rmdir

The one problem is both -mtime and -ctime test when the file was
changed, not when it was created.

-- 
Stuart Jansen <[EMAIL PROTECTED], AIM:StuartMJansen>

"What hole did you dig that up from?" 
   -- my roommate commenting on my taste in music

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
newbies mailing list
[EMAIL PROTECTED]
http://phantom.byu.edu/cgi-bin/mailman/listinfo/newbies

Reply via email to