It seems that --backup-converted option does not work with the
--cut-dirs option properly.
I started using wget to mirror some of my courses' web pages to carry
some lecture notes and stuffs on my laptop. Here's an example I was using
for one of them:
wget -N -E -k -K -r -p \
-np -nH --cut-dirs=1 -X /~cs300/cgi-bin \
http://jupiter.kaist.ac.kr/~cs300
I was quite satisfied at the first time, but soon I noticed that
--backup-converted wasn't working correctly, and wget was repeatedly
downloading converted html pages because of the size mismatch whenever I
run the command again.
To simplify the situation and figure out which options were conflicting,
I made a test site: http://netj.org/tmp/wget.test/.
There are four files here:
index.html
1/index.html
2/index.html
3/index.html
index.html has links to {1,2,3}/index.html and 1,2,3 has a link back to
index.html. Some links are relative and some are absolute and some are
in full url.
I tried mirroring the test site with the following commands.
<NOT create backups(*.orig files)>:
wget -N -E -k -K -r -p -np -nH --cut-dirs=2 http://netj.org/tmp/wget.test/
<works correctly>:
wget -N -E -k -K -r -p -np -nH http://netj.org/tmp/wget.test/
wget -N -E -k -K -r -p -np --cut-dirs=2 http://netj.org/tmp/wget.test/
I tried many combinations with other options and found that using
--cut-dirs with -nH will make -K no effect. But with my photo page
http://netj.org/photo/, -K with -nH and --cut-dirs seems to work well:
wget -N -E -k -K -r -p -np -nH --cut-dirs=1 -l1 http://netj.org/photo/
Maybe it could be so because I used the ``-l1'' option. :-(
I am using wget 1.8.2 in Cygwin/WindowsXP. I tried 1.8.2 on a FreeBSD
box and got the same result. I don't believe this behavior is a feature.
Any ideas or help or solutions to this problem?
Please Cc me since I'm not in the list.
Thanks.
--
netj | Jaeho Shin | ����ȣ ; http://netj.org/
System Programmers' Association for Researching Computer Systems
Division of Computer Science, Department of EECS, KAIST