|
#1
| |||
| |||
| ftp and cron scheduling Here's the situation. i have a file that gets automatically updated via a cron job every few hours. After it gets updated, i want to have it automatically get uploaded to an ftp site. I want to have the full command line switch so that I can use a cron to schedule this as well... something along these lines: ftp serverURL --user user:passwd --upload-file filename any ideas?
__________________ My website. Woo. Hoo. |
|
#2
| |||
| |||
| Take a look at curl (man curl). It should do what you need. If you need more sophisticated behaviour, expect would be the way to go. It doesn't ship with OSX, but should be very easy to build. hope this helps.... -alex.
__________________ Beige G3 desktop w/500MHz G4 ZIF 768 MB RAM, PCI Radeon & USB/Firewire - TiBook 550MHz 256MB DVD - Mac OS X 10.2.4(6I32) on each. ---- PIII500/128MB workhorse running NetBSD 1.6 ---- All sorts of Suns and SGIs running all sorts of UNIXy OSes... |
|
#3
| ||||
| ||||
| curl -T filename -u user:pw ftp://server.com/filename This works ok. Actually you should be able to omit the last "filename" and have the uploaded file default to the local filename, like: curl -T filename -u user:pw ftp://server.com/ But when I do this I get some errors from curl (pointer deallocation) , but it still seems to work though. I have reported this.
__________________ G4 500 MP 1024 MB RAM LaCie Electron 22" Display OS X 10.3.9 iMacDV MacMini iSight iPod + iPod Mini Sony PC100E FireWire Cam Static IP via a FreeBSD server/gateway a lot of other Mac's running Macos 7.5 to 9.1 and NetBSD. A Few Wintel's on the side (I only use them when I get paid by the hour) |
![]() |
| Thread Tools | |
|
|