LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   verifying compressed tar file? (https://www.linuxquestions.org/questions/linux-general-1/verifying-compressed-tar-file-4175507550/)

Mercury305 06-09-2014 11:06 PM

verifying compressed tar file?
 
Anyone know a good way to verify a compressed tar.gz file to its origin archive?

My thoughts are:

Code:

tar dxzvf [filename] [directory archive]
or perhaps...

Code:

gunzip dc [filename] |tar dvf [directory archive]
What you guys think? Can't do it right now as my hard drive is extremely slow so just making guesses and would appreciate your help

MensaWater 06-10-2014 08:25 AM

tar tvf <file.tar.gz>
Will list the contents of the archive without actually writing them to disk.

In the GNU tar you don't have to specify any options for the fact that it is gzip'ped - it will detect it automatically.

You could do a comparison between the list that produces and the list of files in the directories it backed up.

Mercury305 06-12-2014 10:13 PM

Quote:

Originally Posted by MensaWater (Post 5185642)
tar tvf <file.tar.gz>
Will list the contents of the archive without actually writing them to disk.

In the GNU tar you don't have to specify any options for the fact that it is gzip'ped - it will detect it automatically.

You could do a comparison between the list that produces and the list of files in the directories it backed up.

Hi I meant the -d option to verify the content is not corrupted from original files. But thanks for that info I learned something new.


All times are GMT -5. The time now is 07:52 AM.