12-03-2004
I'm not too sure that I follow?...
Let's say you've opened an ftp session between your local machine and your remote server.
$ cd /some/dir
$ ftp my.remote.server.com
You then log in, and if your credentials are correct, receive some kind of prompt and can then start typing ftp commands. Your local directory will be initially set to wherever you started your session (in this case /some/dir), and the remote directory will be set to (usually) your home directory, or if the ftp server is chrooted it could be anywhere, wherever the administrator has specified.
You can find out where you are on the remote server by typing "pwd", and typing "cd" to change directory. You can type "lpwd" and "lcd" to do the same on the local filesystem.
You then use "get" to receive files, and "put" to transmit files. There are a plethora of commands, muchly dependent on the version of ftp you're using. Type "help" at the ftp prompt for details.
Make sure that you set the transfer type to binary when transfering tarballs around.
For example - to transfer /my/files/foo.tar.gz to the remote server my.remote.server.com you could do something like (this isn't real output BTW)...
$ cd /my/files
$ ftp my.remote.server.com
... login ...
ftp> binary
ftp> cd /where/I/want/my/files/on/remote/server
ftp> lpwd
/my/files
ftp> put foo.tar.gz
transferring.....
ftp> ls
foo.tar.gz
ftp> bye
$
Check out the ftp manpage (or the manpage for whatever client you use).
EDIT: It doesn't really matter where you are downloading the files to - usually /usr/local/src is where I put my tarballs - it's a matter of personal preference and site protocol. You can then unpack the tarball and read the README and INSTALL files.
Cheers
ZB
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi there!
I one saw a command that allowed to download a file using lynx from an HTTP server without opening lynx itself.
Looked something like this:
$ lynx -xyz http://localhost/foo.bar ~/foo.bar
I looked into lynx manpages and help but didn't find anything.
Thank you in advance (2 Replies)
Discussion started by: D-Lexy
2 Replies
2. UNIX for Dummies Questions & Answers
can you download folders when in ftp or is the only way to download more then one file by mget?? (6 Replies)
Discussion started by: eloquent99
6 Replies
3. UNIX for Dummies Questions & Answers
Kindly help us... Is there a way in linux how we'll be able to check which workstation is downloading files from the internet and what file is it? Please put into consideration that our linux has a firewall.
Thanks (1 Reply)
Discussion started by: eric_hing
1 Replies
4. UNIX for Dummies Questions & Answers
Is it possible using FTP to download a whole directory and all subdirectories at once without having to go through every single file?
Thanks,
Tom (4 Replies)
Discussion started by: Pokeyzx
4 Replies
5. Linux
My class "UNIX using Linux" started today. The software that came with my text book will not download. I am running XP pro .. When I load the "guide to UNIX using Linux" disk the only thing that comes up is E:/ showing some files that are on the disk and then it stops and does nothing. Can anyone... (13 Replies)
Discussion started by: Tammy
13 Replies
6. Shell Programming and Scripting
HI,
I'm downloading one day old files from ftp site.
Below is my script
----------------------------
printf "open $HOST \n" > ftp.cmd
printf "user $USER $PASSWD\n" >> ftp.cmd
printf "bin\n" >> ftp.cmd
#printf "cd /Models/\n" >> ftp.cmd
printf "prompt\n" >> ftp.cmd
printf "for oldfile... (4 Replies)
Discussion started by: shekhar_v4
4 Replies
7. Shell Programming and Scripting
Hello guys,
i'm searching for a solution how to download all files from root-directory of an ftp-server through an ftp proxy
getting through the ftp proxy and download one file with get ist no problem, but mget * does nothing!
ftp -n -i -v <<EOF
open proxyHost proxyPort
user... (19 Replies)
Discussion started by: macProgger23
19 Replies
8. UNIX for Dummies Questions & Answers
Hi there,
I've got my own domain, ftp etc.. I'm using cPanel and I want to download a file periodically, every say 24 hours.
I've used this command:
wget -t inf http : / / www . somesite . com / webcam.jpg
ftp : / / i @ MyDomain . net : Password @ ftp . MyDomain . net^no spaces... (24 Replies)
Discussion started by: zYx
24 Replies
9. Shell Programming and Scripting
Hello everyone. I'm new both to the forum and to unix scripting, and this website has been very useful in putting together a script I am working on. However, I have run into a bit of a snag, which is why I have come here seeking help. First I will say what I am trying to do, and then what I have... (2 Replies)
Discussion started by: keltonhalbert
2 Replies
10. Shell Programming and Scripting
Hi every one,
I have the requirement to download the files from FTP and move those files to unix box. Once after coping the files, i need to remove the files in FTP.
I'm a newbie in Unix script. Can you please suggest a script for this.. Thanks in advance.. (2 Replies)
Discussion started by: Murali4u
2 Replies
LEARN ABOUT OSX
ftp_geturl
ftp::geturl(n) ftp client ftp::geturl(n)
__________________________________________________________________________________________________________________________________________________
NAME
ftp::geturl - Uri handler for ftp urls
SYNOPSIS
package require Tcl 8.2
package require ftp::geturl ?0.2.1?
::ftp::geturl url
_________________________________________________________________
DESCRIPTION
This package provides a command which wraps around the client side of the ftp protocol provided by package ftp to allow the retrieval of
urls using the ftp schema.
API
::ftp::geturl url
This command can be used by the generic command ::uri::geturl (See package uri) to retrieve the contents of ftp urls. Internally it
uses the commands of the package ftp to fulfill the request.
The contents of a ftp url are defined as follows:
file The contents of the specified file itself.
directory
A listing of the contents of the directory in key value notation where the file name is the key and its attributes the asso-
ciated value.
link The attributes of the link, including the path it refers to.
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category ftp of
the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for
either package and/or documentation.
SEE ALSO
ftpd, mime, pop3, smtp
KEYWORDS
ftp, internet, net, rfc 959
CATEGORY
Networking
ftp 0.2.1 ftp::geturl(n)