Active log.bz2 file - Need to copy the active file without corrupting
Hi,
I have a compressed log file which gets restarted everyday and starts a new log i.e. todays log file 21072017.bz2.
I need to take a snapshot of the active log file and copy it to another directory in order to decompress and view the file contents.
so I copied the file to /temp
when I then run bzip2 -d 21072017.log.bz2 I get the following:
bzip2: Compressed file ends unexpectedly;
perhaps it is corrupted? *Possible* reason follows.
bzip2: No such file or directory
Input file = 21072017.log.bz2, output file = 21072017.log
It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.
You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.
bzip2: Deleting output file 20170721.log, if it exists.
Any help on how I can hot copy or snapshot this file please would be great.
|