Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

From a DD-WRT router I want to create a cron-job that wget's an image from a remote location. This image is to be passed on to a remote FTP server for storage. The process is to be repeated every minute, naming the destination image on the ftp with the current time :

wget: get file from -> http://37.***.9.95/fullsize.jpg 

ftp: put fullsize.jpg -> ftp://83.***.151.224/shares/camera/dateTimeNow.jpg

Where dateTimeNow is the current time. The ftp server for storage is not smart enough to have either cron nor something else than just FTP. the DD-WRT device however, has cron!

share|improve this question
Do you want dateTimeNow.jpg to be that string or the actual date/time now? –  slm May 3 '13 at 15:11
Also can you confirm that dd-wrt provides cron facilities? –  slm May 3 '13 at 15:12
Can't you do this directly from the ftp server? –  terdon May 3 '13 at 15:21
dd-wrt has cron: –  derobert May 3 '13 at 17:37
Do you have an FTP client available on your dd-wrt? Unless you have optware enabled and have installed one, I'd guess "no". –  derobert May 3 '13 at 17:39

1 Answer 1

If curl is available, something like this should work (untested; choose your own timestamp format for date command):

curl http://source/image.jpg | curl --upload-file - "ftp://destination/$(date +%F).jpg"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.