LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-09-2014, 11:06 PM   #1
Mercury305
Member
 
Registered: Jul 2012
Location: Rockville, MD
Distribution: CrunchBang / Ubuntu
Posts: 540

Rep: Reputation: Disabled
Question 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

Last edited by Mercury305; 06-09-2014 at 11:09 PM.
 
Old 06-10-2014, 08:25 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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.
 
1 members found this post helpful.
Old 06-12-2014, 10:13 PM   #3
Mercury305
Member
 
Registered: Jul 2012
Location: Rockville, MD
Distribution: CrunchBang / Ubuntu
Posts: 540

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MensaWater View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Using split and tar to get the compressed files ytyyutianyun Linux - Newbie 10 12-12-2013 07:08 PM
Editing a compressed tar.. iuselinux Linux - General 5 03-14-2011 11:28 AM
need to check tar file against directory it just compressed pendal Programming 5 12-03-2009 12:06 PM
Using Tar/Star to copy a compressed file from tape geokker Linux - Software 1 09-09-2005 07:32 AM
How to uninstall program compressed with tar.gz ronronson Linux - Newbie 1 06-11-2004 03:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration