in reply to Re: Has foo.tar.bz2 been extracted to $dirrectory?
in thread Has foo.tar.bz2 been extracted to $dirrectory?

That would help me while executing my script, but not when the script has run and I don't know if it completed or not.
  • Comment on Re: Re: Has foo.tar.bz2 been extracted to $dirrectory?

Replies are listed 'Best First'.
Re: Re: Re: Has foo.tar.bz2 been extracted to $dirrectory?
by waswas-fng (Curate) on Nov 04, 2002 at 15:48 UTC
    Welp, you have really a few options, see if the app writing the file has a lock on it, or check to see if the size of the file is changing for x number of seconds. The C::Bzip2 module failing on decompress will tell you that A: the file is corrupt or B: the file is not all downloaded. You also could try to take the update of the file (Net::FTP etc) into your script so you KNOW when the transfer is complete or if it is a partial. IMHO this is the best route so you don't "spin cycles" checking to see if the file is complete, new or such.

    -Waswas