Solved

WGET string must not be configured right

Posted on 2011-02-27
5
376 Views
Last Modified: 2012-05-11
So when I issure:

wget -N -c -np -r -N -l inf -w 5 --limit-rate=200K http://www.mysite.com/files

Why does it download all the files in http://www.mysite.com/other directory?
0
Comment
Question by:hrolsons
  • 2
  • 2
5 Comments
 
LVL 17

Expert Comment

by:Sikhumbuzo Ntsada
ID: 34994388
wget -N -c -np -r -N -l inf -w 5 --limit-rate=200K
0
 
LVL 17

Expert Comment

by:Sikhumbuzo Ntsada
ID: 34994392
This is what I meant:

wget -N -c -p -r -N -l inf -w 5 --limit-rate=200K

0
 

Author Comment

by:hrolsons
ID: 34994411
So, it looks like you changed "-np" to "-p", help me understand.  I tried to look it up and my brain got frazzled.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 34996338
Hi again,

"-np" is quite correct! It will take care that the current hierarchy is not left, but you must tell wget that "files" is a directory! Else "files" will be considered a regular file whose directory is "/", thus making all the "-np" stuff meaningless.

Use

wget -N -c -p -r -l inf -w 5 --limit-rate=200K  http://www.mysite.com/files/

i.e. with a trailing slash ( / ), so wget can identify "files" as a directory!

Btw. No need to specify "-N" twice!

wmp


0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 34996343
Sorry, copied the wrong line!!

wget -N -c -np -r -l inf -w 5 --limit-rate=200K  http://www.mysite.com/files/
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now