Today's Posts

Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

downloading through ftp

advanced, linux, linux commands

Login to Reply

Thread Tools Search this Thread
# 1  
Old 12-03-2004
Computer downloading through ftp

i have been busy getting accustomed to ssh and ftp and have a remote account that I am trying to comprehend.. my question is when I use ftp, ssh and remote accounts where do I download packages to.. which directory..
i have a cooledit package that is tarred and gziped which I ncftpd from metalab.unc.edu along with other packages some are docs some are man pages etc.. where do i target these files when I download them on my operating system or on my remote account.
thanx moxxx68
# 2  
Old 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
ftp> put foo.tar.gz
ftp> ls
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.

# 3  
Old 12-03-2004
I have a site on my other browser that is called www.pathname.com/fhs etc... this page is basically providing information on the fileheirarchy.. and it states that you should not place any binaries in etc.. (which I am not following to well.. it is saying to place packages in /ect/opt/package which i am not following either.. do I just place the install package in /etc/opt or the whole .tgz package. including all the readmes and so on.. if you could give a brief decription of how I should go about installing a package on my system in /etc/opt since I have been able to download them but they don't seem to work.
thanx moxxx68

Last edited by moxxx68; 12-03-2004 at 10:05 PM..
# 4  
Old 12-03-2004
The tar.gz file is not what the FHS is referring to as a binary in this case. You can just copy/download the tar.gz file anywhere - /usr/local/src or /tmp will suffice. Then gunzip and untar the tarball and install per instructions (usually ./configure && make && su -c "make install" will do it- but read the README and INSTALL files contained within the tarball.)

Then, the make install step will actually copy the binaries over to /usr/local/bin (unless you specify otherwise during ./configure - manual pages etc will also be copied to the relevant locations) - which is in keeping with the FHS.

You can then delete the unpacked source if you want. This is all inline with the FHS.

# 5  
Old 12-04-2004
i have a problem with packages that require make install installations..
i tried the syntax;
./configure && make && su -c "make install" as stated
is there a way to go about this installing the package manually like it is possible with some binary packages.
# 6  
Old 12-04-2004
Why didn't it work?
What error output was there?

The "./configure && make && make install" three-card-trick is a generalisation - did you read the README and/or INSTALL files contained within the tarball?

Were you "cd'd" into the root of the source directory (i.e. the directory containing the configure script) when you issued the commands?

My usual procedure for installing a tarball under linux is...

$ cd /usr/local/src
$ ls
$ zcat my-src-0.1.tar.gz | tar xvf -
$ ls
$ cd my-src-0.1
$ more README
$ more INSTALL
$ ./configure && make && su -c "make install"

Of course, your install routine will no doubt differ. Make sure you read README and INSTALL for the correct installation procedure for your package.

If you can, try somewhere like rpmfind.net to download an rpm file for your distribution - then just use rpm -i to install it - could save you a lot of headaches.

# 7  
Old 12-05-2004
the first time I tried i did't read the READ ME and the INSTALL, the second time I tried I had to manully load up the files and that worked great.. binary called ccrypt: put the binary itself in /usr/local and gzipped the lib docs for the binary and placed in the man1 and now it is fully operational in script form and has an info and man page. when I tried this the third time no success "error missing package". as for the samba ./configure && make && su -c "make install" this time it worked. I am still reading up on it.
Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
File downloading Jackbird UNIX for Beginners Questions & Answers 9 01-30-2017 05:45 AM
Downloading FTP Files Murali4u Shell Programming and Scripting 2 05-27-2011 05:48 PM
Downloading with Wget keltonhalbert Shell Programming and Scripting 2 05-18-2011 01:14 AM
Crontab Wget, downloading a file to a FTP zYx UNIX for Dummies Questions & Answers 24 11-06-2010 10:52 PM
shell script - ftp downloading serveral files without mget macProgger23 Shell Programming and Scripting 19 09-11-2009 09:56 AM
Problem in Downloading one day old files from FTP site shekhar_v4 Shell Programming and Scripting 4 01-22-2009 01:31 PM
downloading a folder soemac Shell Programming and Scripting 1 05-24-2008 10:52 AM
downloading linux dannyd Linux 2 02-18-2007 12:34 AM
downloading linux buddhika Linux 2 06-11-2006 10:20 AM
Downloading Linux Tammy Linux 13 05-19-2006 06:48 AM
Downloading whole directory with FTP Pokeyzx UNIX for Dummies Questions & Answers 4 11-19-2004 07:51 PM
Downloading Unix.. binary_w0lf UNIX for Dummies Questions & Answers 4 06-22-2004 08:12 PM
Downloading eric_hing UNIX for Dummies Questions & Answers 1 09-05-2003 04:12 PM
downloading folders in ftp eloquent99 UNIX for Dummies Questions & Answers 6 04-23-2003 04:06 PM
Downloading with lynx D-Lexy UNIX for Dummies Questions & Answers 2 01-21-2003 10:54 PM

All times are GMT -4. The time now is 09:26 PM.

Unix & Linux Forums Content Copyright 1993-2018. All Rights Reserved.
Show Password