• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 388
  • Last Modified:

WGET string must not be configured right

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
hrolsons
Asked:
hrolsons
  • 2
  • 2
1 Solution
 
Sikhumbuzo NtsadaSenior IT TechnicianCommented:
wget -N -c -np -r -N -l inf -w 5 --limit-rate=200K
0
 
Sikhumbuzo NtsadaSenior IT TechnicianCommented:
This is what I meant:

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

0
 
hrolsonsAuthor Commented:
So, it looks like you changed "-np" to "-p", help me understand.  I tried to look it up and my brain got frazzled.
0
 
woolmilkporcCommented:
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
 
woolmilkporcCommented:
Sorry, copied the wrong line!!

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

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now