So would the one in the for loop. I just used the ".", but you could do
the same path as in the for loop:
find /path/to/downloads -name "index*.html" |xargs rm
The problem with specifying the /path/to/downloads is that if the
contents are very large, some systems will error with the "The parameter
list is too long" error. You might have to tweak it a bit on your
system to figure out which works best.
Alan.
Evert Meulie wrote the following on 11/8/2005 8:51 AM:
But that would also wipe out all legitimate index.html files, right? ;-)
Evert
Alan.Hall wrote:
A less resource intensive solution might be:
find . -name "index*.html" |xargs rm
Alan.
Evert Meulie wrote the following on 11/8/2005 2:58 AM:
The Gentoo forum provided me with the following script, that seems
to do the job:
for dir in $(find /path/to/downloads -type d); do
rm $dir/index.html?* && rm $dir/index.html
done
(from http://forums.gentoo.org/viewtopic-t-399594.html )
Regards,
Evert
Evert Meulie wrote:
Tobias Tiederle wrote:
Evert Meulie schrieb:
Hi!
Thanks for the reply. Since I have no control over the server
from which I'm pulling the mirror AND I do not want to live with
these files ( 8-) ), I was wondering whether there's a way to
exclude certain file names, so that I can exclude the
index.html?* wildcard...?
afaik there's no way (with official releases) to do this.
I have a regex patch for 1.9.1 lying around on my system but its
not included in current wget releases (because it used pcre
instead of gnu regex/c library regex).
Last thing I heard regex support is planned for 1.11.
(If you mirror this site often, why not use a script and delete
them afterwards?)
That is not a bad idea either! :-)
Does anyone here happen to have a script that does a recursive
delete of all of these index.html?* and index.html (but ONLY if
there is a index.html?* file in the same directory)? Writing a
script like this exceeds my scripting capabilities... :-/
Regards,
Evert
begin:vcard
fn:Alan Hall
n:Hall;Alan
org:(828)271-4071;NOAA's National Climatic Data Center
adr;dom:;;151 Patton Ave;Asheville;NC;28801-5001
email;internet:[EMAIL PROTECTED]
title:IT Team Leader
tel;work:(828)271-4071
tel;fax:(828)271-4022
x-mozilla-html:TRUE
version:2.1
end:vcard