Solved

WGET string must not be configured right

Posted on 2011-02-27
5
377 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AWS RDS 3 66
Linux Mint 18 31 76
How to mount an LVM partition that is part of a disk image. 3 49
Centos 6 User Can't Assign Password 2 24
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…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

911 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

23 Experts available now in Live!

Get 1:1 Help Now