image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
Thread Tools
  #1  
Old November 17th, 2001, 09:19 PM
Registered User
 
Join Date: Jan 2001
Location: PA, USA
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
AxsDeny is on a distinguished road
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.
Reply With Quote
  #2  
Old November 17th, 2001, 09:44 PM
Defender of the Realm
 
Join Date: Jun 2001
Location: nyc
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
alexrd is on a distinguished road
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...
Reply With Quote
  #3  
Old November 18th, 2001, 09:38 AM
gumse's Avatar
Member
 
Join Date: Mar 2001
Location: Sweden
Posts: 403
Thanks: 0
Thanked 0 Times in 0 Posts
gumse is on a distinguished road
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)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 01:48 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.