LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-17-2005, 05:15 PM   #1
obelxi
LQ Newbie
 
Registered: Feb 2005
Posts: 28

Rep: Reputation: 15
Best way to upload (FTP) something via the command line...


I've got my own webserver running ftp and I'm wondering how best to upload to it via the command line. I had tried curl but I get this problem...

%curl -T test.png -u userass -O ftp://obelix.ca/public_html/xgrid
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
curl: (25) Failed FTP upload: Can't open that file: Is a directory

I run ls and see that yes in fact test.png is there and it is NOT a directory. All I want to do is upload a png file to my ftp server but curl keeps doing funny things. Is there a better way to do this?

I tried the ftp command but I like being able to do everything all in one command and not have to go into prompts for entering things.
 
Old 03-17-2005, 06:13 PM   #2
kevinatkins
Member
 
Registered: Jan 2004
Location: cheshire, uk
Distribution: Ubuntu Hoary
Posts: 605

Rep: Reputation: 33
hi,

you could just use straightforward ftp - open your console and type 'ftp'; you should then see the ftp command prompt. type 'help' for a list of options. to connect to your remote machine, type 'open <remote site name>' and you should be able to navigate around...

it's probably also worth checking the ftp man page.
 
Old 03-17-2005, 06:15 PM   #3
obelxi
LQ Newbie
 
Registered: Feb 2005
Posts: 28

Original Poster
Rep: Reputation: 15
yes but I need to run it all as one command because it's part of a script. Using ftp doesn't work because it has that dumb console you have to use in order to type everything in.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is different with Ftp From browser and Ftp from command line zahra79 Linux - Networking 2 06-22-2005 03:26 AM
Command Line FTP erikcw Fedora 3 10-12-2004 09:44 AM
ftp command line acrors Fedora 3 10-02-2004 04:55 AM
Get Directories with Command Line FTP? BLazeD Linux - Newbie 2 09-09-2004 02:47 AM
upload directories via ftp command farqad Linux - Networking 3 10-06-2003 08:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration