Solved

WGET string must not be configured right

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

733 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