Automatically delete files on USB drive/FTP server

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> General Questions
Author Message
AliveNoMore
DD-WRT Novice


Joined: 12 Apr 2014
Posts: 2

PostPosted: Sat Apr 12, 2014 12:06    Post subject: Automatically delete files on USB drive/FTP server Reply with quote
Hi.

Is there a way to automatically delete older files on the mounted USB drive/FTP server, since there is limited storage space?
Sponsor
chris3002
DD-WRT Novice


Joined: 03 Mar 2014
Posts: 7

PostPosted: Sat Apr 12, 2014 18:19    Post subject: Reply with quote
Hi,

I would try it with a script:

for example this would remove files older than 3 days from /mnt/sda

find /mnt/sda -type f -mtime +3 -exec rm {} \;

you can add it as a cron job as well
AliveNoMore
DD-WRT Novice


Joined: 12 Apr 2014
Posts: 2

PostPosted: Sun Apr 13, 2014 12:22    Post subject: Reply with quote
This looks alright, I'll see if I can tailor it even further. Thanks.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum