LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-23-2014, 08:32 AM   #1
lensilvan
Member
 
Registered: Jun 2013
Distribution: Arch Linux, Mintppc, Slackware
Posts: 160

Rep: Reputation: Disabled
How to download the content of a directory with wget?


Hi,

I searched but didn't find a good answer to the following problem...

How can I download the files in the following directory: http://www.slackware.org.uk/msb/14.1/1.8/x86_64/base to a newly created directory in $HOME?

Last edited by lensilvan; 07-23-2014 at 09:34 PM.
 
Old 07-23-2014, 09:33 AM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Code:
cd $HOME/your_dir
lftp -c "open http://www.slackware.org.uk/msb/14.1/1.8/x86_64/base; mirror"
You might have to install 'lftp'
 
1 members found this post helpful.
Old 07-23-2014, 11:36 AM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Use the "-r" flag for a recursive grab. If you want to resume a previous one, add the "-N" flag. If you want to skip the directory structure you can use the "-nd" and "-np" flags.

eg:
Code:
wget -r -N -nd -np http://www.slackware.org.uk/msb/14.1/1.8/x86_64/base
This will dump the files into your CWD, so just cd into the directory before running it to dump the files there.
 
Old 07-23-2014, 09:33 PM   #4
lensilvan
Member
 
Registered: Jun 2013
Distribution: Arch Linux, Mintppc, Slackware
Posts: 160

Original Poster
Rep: Reputation: Disabled
Solved, thank you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] wget lists entire directory during FTP download Hidden Windshield Linux - Software 4 08-07-2013 11:26 AM
wget and download from 1x.com mimhedal Linux - Newbie 2 02-16-2011 11:07 AM
How to use wget to move content from one directory to another Spawn10 Linux - Newbie 2 09-21-2010 03:38 PM
Download with wget.....or!!!!! mpregos Slackware 7 06-23-2009 02:51 PM
wget option to get download directory just.srad Linux - General 2 10-30-2008 08:37 AM

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

All times are GMT -5. The time now is 04:02 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