How to generate a list of files retrieved by wget?

  • Caroline Jumper
  • Born
  • Born
  • Caroline Jumper
  • Posts: 1

Post 3+ Months Ago

Hi-

I use wget to mirror a large, convoluted web site, retrieving only those files that are new or updated. Both the local and mirrored site run on Unix.

Does anyone have a script to identify files that were retrieved?

Ideally I'd like to automatically generate an email to myself when files are retrieved.

Many thanks,
Caroline Jumper
San Jose
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • mo_mughrabi
  • Student
  • Student
  • User avatar
  • Posts: 73

Post 3+ Months Ago

You must have some sort of a loop or something to do that. If your scripts are running to retrieve list of files and once all the list is over you. The best thing is to use a loop, something like this:

Code: [ Select ]
while true
do
wget http://blah-blah.com/$VAR
LIST<<$VAR
done;mail youremail@mail.com<LIST
  1. while true
  2. do
  3. wget http://blah-blah.com/$VAR
  4. LIST<<$VAR
  5. done;mail youremail@mail.com<LIST


This will work out, just make the modifications. $VAR is for the files you are looping to wget and LIST is the file which will be populated in the end. Make sure you run the whole thing at once, or put it in .sh script and fire.. In that case, once the loop is over the mail command will pick up..


Cheers,

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 23 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.