Hi Miroslaw,
AFIAK there is no option to get wget deleting files it did not download
in that turn. So if you want to use wget for mirroring you would need to
redownload the whole server to a local dir and than do something like
--- CUT here ---
cd new_dir
find . >../new_files
cd ..
cp -af new_dir/* old_dir/
cd old_dir
find . -ctime -$DaysOnMirror >../old_files
rm $(cat ../new_files ../old_files | sort | uniq -u)
cd ..
rm -rf new_dir
--- CUT here ---
I didn't try, so it may be buggy, but i guess it works, just keep your
files in old_dir, downlaod new files to new_dir, replace $DaysOnMirror
by the appropriate number (leaving e.g. -5 there), cross your fingers
and old_dir should be up to date.
I would suggest that tools like rsync are more appropriate for the task.
Greetings
Matthias
MK schrieb:
I need to mirror ftp site including case when some file disapperared from
ftp server - I need to delete this local file too.
But ftp server keeps only e.g. 3 months so I need to restrict downloaded
file by date .
Is it possible with WGET ?
Thanks.
Miroslav