Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[Fedora 2] How to remove wget .listing files? 1

Status
Not open for further replies.

frummel

Technical User
Jun 21, 2002
91
NL
I accidently removed a local directory whose contents were mirrored from the McAfee ftp server.
I ran my wget mirror command again, but now nothing happens. I don't get the files from the ftp server anymore.

The wget log file shows:
Code:
--22:10:22--  ftp://ftpeur.nai.com/CommonUpdater
           => `.listing'
Resolving ftpeur.nai.com... 63.216.25.134, 166.90.213.143
Connecting to ftpeur.nai.com[63.216.25.134]:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD not needed.
==> PASV ... done.    ==> LIST ... done.

    0K                                                         128.27 KB/s

22:10:24 (128.27 KB/s) - `.listing' saved [455]

--22:10:24--  ftp://ftpeur.nai.com/CommonUpdater
           => `CommonUpdater'
==> CWD not required.
==> PASV ... done.    ==> RETR CommonUpdater ... 
No such file `CommonUpdater'.


FINISHED --22:10:24--
Downloaded: 455 bytes in 1 files
I usually get the results in the log file when there is nothing to be updated...

So, I tried to remove these .listing files from every directory, but even when I delete my entire local directory, when I run slocate, I get results when searching for .listing files. The directories holding the files in the search result, are the ones I just deleted.

The wget mirror script is absolutely OK, it has worked for months without any problems, when run from CRON on daily bases.

How can I fix this problem?
 
Wget should remote .listing files by default, it only has a -nr switch to NOT remove them. With debian here, wget prints
Removed `.listing'.
Wrote HTML-ized index to `index.html' [3245].

when trying to downloading CommonUpdater/ without -r

find /a/root -name .listing -o -name index.html\* -print0 | xargs -0n 5000 rm # to completly remove index and .listing files

Take a look at 'puf' for a threaded speedy alternative.

. Mac for productivity
.. Linux for developement
... Windows for solitaire
 
The wget command I use is:

Code:
wget --mirror --timestamping --no-host-directories --passive-ftp --no-parent --cut-dirs=1 --output-file=/data-2/log/wget-mcafee-update.log ftp://ftpeur.nai.com/CommonUpdater

The command looks OK to me; I don't use the -nr flag...

Your advise: ' find /a/root -name .listing -o -name index.html\* -print0 | xargs -0n 5000 rm ' I don't understand... What should I be looking for exactly?

Thanks again!
 
I read xmb's post again.
I put a / after 'ftp://ftpeur.nai.com/CommonUpdater' so it matches 'ftp://ftpeur.nai.com/CommonUpdater/'.

The script is running again, although I have no clue why this slash makes such a difference... Is it because wget sees CommonUpdater as a FILE not a folder without the '/'?
 
-np (--no-parent) is not much suitable for real mirrors, mmm? Excepts few-directories-in-one.

Failing is due to wget thinking its a file
==> PASV ... done. ==> RETR CommonUpdater ...

the find /mirror/home .. | xargs rm is for searching and removing all found index.html and .listing files inside /mirror/home

I tried puf on it.. doesnt support ftp uri's =/

. Mac for productivity
.. Linux for developement
... Windows for solitaire
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top