LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-27-2011, 06:20 AM   #1
tramni1980
Member
 
Registered: Jul 2006
Location: Köln, Germany
Distribution: Slackware64-14.2 & -current, DragonFly BSD, OpenBSD
Posts: 819

Rep: Reputation: 55
frustration with wget


Hello!
I am using GNU Wget 1.11.4 that comes with Slackware-12.2.0. I want to download the the directory
Code:
http://connie.slackware.com/~alien/multilib/13.37
with all files and subdirectories in it, with the exception of the "debug" directory. Here is the command that I issue:
Code:
wget -r -np -nH -l3 --cut-dirs=2 -A.tgz -A.txz -X /debug -N http://connie.slackware.com/~alien/multilib/13.37
Despite the "-np" aregument, the command still downloads the other directories that are under http://connie.slackware.com/~alien/multilib, i.e. "13.0", "13.1", "current" and "source". Is there a way that I tell wget to ONLY download the "13.37" directory?

Many thanks in advance.

Martin
 
Old 06-27-2011, 06:39 AM   #2
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
I 'think' it is because you missed the slash off the end. Also I fairly sure you want to exclude '*/*/*/debug' or it will fail to leave out debug. Oh and you can just write -Atgz,txz, i.e.:

Code:
wget -r -np -nH -l3 --cut-dirs=2 -Atgz,txz -X */*/*/debug -N http://connie.slackware.com/~alien/multilib/13.37/
P.S. I wouldn't exclude the md5sums and signatures personally but that is your choice of course.
 
Old 06-27-2011, 06:45 AM   #3
CTM
Member
 
Registered: Apr 2004
Distribution: Slackware
Posts: 308

Rep: Reputation: 287Reputation: 287Reputation: 287
This may be cheating (sorry! ), but I've always found lftp much more convenient for mirroring remote directories over HTTP or FTP:

Code:
lftp -c mirror -x "^debug/" http://connie.slackware.com/~alien/multilib/13.37/
 
1 members found this post helpful.
Old 06-27-2011, 06:48 AM   #4
Mark Pettit
Member
 
Registered: Dec 2008
Location: Cape Town, South Africa
Distribution: Slackware 15.0
Posts: 619

Rep: Reputation: 299Reputation: 299Reputation: 299
@CTM - I think that your way is in fact what AlienBob suggests himself. Although the best way is probably using rsync, but not all servers support that. Pity. A good example of one that does is the SlackBuilds site.
 
Old 06-27-2011, 06:55 AM   #5
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Well if we are using lftp, remember he only wanted the packages themselves was intending to create the 13.37 directory. So what about connecting as:

Code:
lftp http://connie.slackware.com/~alien/multilib/
Then issuing:

Code:
mirror -I *.t?z -x debug 13.37/
 
Old 06-27-2011, 07:12 AM   #6
tramni1980
Member
 
Registered: Jul 2006
Location: Köln, Germany
Distribution: Slackware64-14.2 & -current, DragonFly BSD, OpenBSD
Posts: 819

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by ruario View Post
I 'think' it is because you missed the slash off the end.
Thanks a lot, that was really the problem.

Solved!
 
Old 06-27-2011, 07:16 AM   #7
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Great!

By the way no doubt you realised this but since you are here reading this I might as well say it anyway. If you do decide you want the signatures, md5sums, etc. (and I think you should ), then you could simplify that wget command down to:

Code:
wget -r -np -nH --cut-dirs=2 -X */*/*/debug -N -R *.html* http://connie.slackware.com/~alien/multilib/13.37/
P.S. I also removed -l3 because it defaults to 5, which is more than enough anyway.
 
  


Reply



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
How to resume an interrupted wget using wget.log? misterJ Linux - Software 2 06-19-2011 01:21 PM
wget not working! but "man wget is" ??? wrapster Solaris / OpenSolaris 5 07-30-2008 03:00 AM
frustration! modules! nixel Slackware 10 05-11-2004 07:24 PM
shorewall = frustration renato167 Linux - Networking 3 05-19-2003 12:25 AM
Frustration with Mandrake 9.1 frkstein Linux - General 2 04-02-2003 07:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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