[X-Unix] ftp question
David Ledger
dledger at ivdcs.demon.co.uk
Tue Jun 1 15:22:23 PDT 2010
At 15:52 -0500 1/6/10, Russell McGaha wrote:
>Folks;
> I'm trying to script an upload to a ftp site:
> I can log into the ftp site with the script, but I
>can't figure out how to upload the file. Here's what I'm doing:
> ftp ftp;//username:password at ftpsite:21/path
> this gets me to the directory were I want to
>upload the file, and gets me an "ftp>" prompt. I've tried passing a
>"-u /fullPathToLocalFile" on that same line with no luck. I've also
>tried using "put /fullPathToLocalFile" on a new line, also without
>success. WHAT am I doing wrong
When you have the "ftp> " prompt, a "?<return>" will give a list of
available commands.
put <local-file-name> <remote-file-name>
uploads a file. 'get ...' downloads. If you just enter 'put' or 'get'
you are prompted for the filenames.
mput & mget handle multiple files by specifying the source using wildcards.
'cd' moves around the directory structure at the remote end, 'lcd' at
the local end. 'dir' or 'ls' give 'ls -l' type directory listings.
It's an odd interface from a modern point of view but it was on of
the very first TCP protocols.
David
--
David Ledger - Freelance Unix Sysadmin in the UK.
HP-UX specialist of hpUG technical user group (www.hpug.org.uk)
david.ledger at ivdcs.co.uk
www.ivdcs.co.uk
More information about the X-Unix
mailing list