dirac has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
I am looking for the best way for checking when a tar file has finished his filling before open it. The Tar is created by another process. I need to find all tar files and untar all but only if the file has ended his creation.
I am using this way:
... while (1) { ... for my $tgz ( <*.tgz> ) { # wait 1 min for safety if Tar file would not finished the fill next unless time - (stat($tgz))[9] > 60; my @file = Archive::Tar->extract_archive($tgz, 1); ...
advices for a best way?
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Best way for testing the end of the filling of a Tar file before opening it.
by roboticus (Chancellor) on Feb 06, 2014 at 14:05 UTC | |
|
Re: Best way for testing the end of the filling of a Tar file before opening it.
by BrowserUk (Patriarch) on Feb 07, 2014 at 00:33 UTC | |
|
Re: Best way for testing the end of the filling of a Tar file before opening it.
by oiskuu (Hermit) on Feb 06, 2014 at 23:58 UTC | |
|
Re: Best way for testing the end of the filling of a Tar file before opening it.
by jellisii2 (Hermit) on Feb 06, 2014 at 20:09 UTC |