This line:
rm $dir/index.html?* && rm $dir/index.html
says:
If (the files $dir/index.html?* exists ) then
delete $dir/index.html?*
delete $dir/index.html
end if
HTH
Oliver
Alan.Hall wrote:
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
--
Oliver Schulze L.
<[EMAIL PROTECTED]>