Solved

WGET string must not be configured right

Posted on 2011-02-27
5
382 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

717 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