LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   How to download the source files from command line (https://www.linuxquestions.org/questions/linux-from-scratch-13/how-to-download-the-source-files-from-command-line-4175451852/)

yjy4321 02-27-2013 12:48 AM

How to download the source files from command line
 
I built LFS successfully. It can ping "google.com". I noticed that it has ftp installed. Can I use this to download other tar.gz files from internet? Or what other commands can I use from a basic newly built LFS?

I did quick google search. But they all mention about "wget" which is not installed on a basic LFS.

druuna 02-27-2013 01:24 AM

LFS is very basic (only provides the essentials needed), to a point that it isn't really useful/workable. If you have build LFS to use on a daily base and not 'just' as an exercise, you need to have a look at BLFS.

BLFS is the icing on the cake. It is a collection of programs and dependencies that you can choose from to make your LFS usable. Not all packages need to be installed, just pick the ones you want/need (you do need to do chapter 3).

wget, among other goodies, is part of BLFS.

yjy4321 02-27-2013 11:08 AM

I was trying to do BLFS. But I did not know in advance which packages I need to install. So I wanted to avoid doing download some packages, copy them to USB stick, mount, copy to lfs, umount USB. After I did this few times, I was tired of doing it. I think I just need to do this one more time for "wget". Then I can just use "wget" to download anything else I need...

So I cannot use "ftp" to download a file? For example I want to download ftp://ftp.gnu.org/gnu/wget/wget-1.14.tar.xz using ftp, not wget.

druuna 02-27-2013 11:38 AM

Quote:

Originally Posted by yjy4321 (Post 4900945)
So I cannot use "ftp" to download a file? For example I want to download ftp://ftp.gnu.org/gnu/wget/wget-1.14.tar.xz using ftp, not wget.

Yes, you can.

There are a few basic networking tools installed that you can use, have a look at Contents of (at the bottom) of the 6.36. Inetutils page.

Keith Hedger 02-27-2013 04:56 PM

Why do you not want to install wget? There is only one dependency that I know of ( openssl ) and neither takes a lot of space or effort to compile also wget is MUCH more versatile and easier to use than the basic ftp client. You won't really get very far without it it.

stoat 02-28-2013 11:31 AM

Quote:

Originally Posted by yjy4321

So I wanted to avoid doing download some packages, copy them to USB stick, mount, copy to lfs, umount USB. After I did this few times, I was tired of doing it.

I know I'm piling on to this late. And I know from other threads that yjy4321 has moved on from this point. Nevertheless I wanted to type a few additional words for the record and future readers to say that it is sort of standard operating procedure for most people around here to install first in a new LFS system the BLFS packages GPM, Wget, and Lynx. With those three, one can read the book, copy & paste with a mouse cursor from the book to another tty console, and download packages with the links and scripts in the book (if your LFS's static IP connection is working). In other words, everything one needs to be able to do to start building a BLFS system from within an independent LFS system. It's all in Chapter 9 of the book (an easy one to overlook).

For those not used to text-based browsers such as Lynx, a short learning and adjustment period is required. It's a little like learning vi as a text editor... once a few basic maneuvers are acquired, one can do most everything needed. Anyway, my usual routine is to use those things installed first to set up the firewall and then go straight for X, Fluxbox, and a file manager. Then on and on from there.


All times are GMT -5. The time now is 07:09 AM.