Comparing two tar files on AIX


 
Thread Tools Search this Thread
Operating Systems AIX Comparing two tar files on AIX
# 1  
Old 12-04-2014
Comparing two tar files on AIX

Hello,

I have a directory which suddenly got filled up 100% from 70% ; (this is an oracle directory which has application and database in it ORACLE EBS)

I do make cold backups, last month when I made cold backup of the directory /oratec the tar zip file was 31GB and this month when i made the backup it was 42GB

an increase of 10GB in the zip/tar compressed file.

How can I find by comparing the two tar files which file or folder has
  1. changed in size
  2. size of all the folders
  3. size of large files

thanks

Last edited by rbatte1; 12-04-2014 at 01:02 PM.. Reason: Added LIST=1 tags
# 2  
Old 12-04-2014
Running tar tvzf tarfile.tgz will give you date and size of the respective files; at least a first evidence for file changes.
# 3  
Old 12-04-2014
thanks RudiC , but the data is composed of 270 GB so imagine the number of files and directories.

Anyway to compare two tar files ?
# 4  
Old 12-04-2014
Use what RudiC wrote and redirect output to a file each and compare them with diff? Or maybe use cksum on the archive files.
# 5  
Old 12-04-2014
Quote:
Originally Posted by RudiC
Running tar tvzf tarfile.tgz will give you date and size of the respective files; at least a first evidence for file changes.
Yes, but only if you use GNU-tar, because the standard AIX-tar doesn't understand the "-z" (decompress from zip-compressed format) option. I suggest to use

Code:
gzip -cd /path/to.tar.gz | tar -tf -

instead which will work with GNU-tar and any standard-tar alike.

Quote:
Originally Posted by filosophizer
thanks RudiC , but the data is composed of 270 GB so imagine the number of files and directories.
The "-t" option RudiC suggested only lists the names and sizes of the files, not the files themselves. The output depends on how many files there are but typical database-files are a few and big. Furthermore, you do not need to compare the different outputs by hand, use the "diff" tool as suggested by zaxxon.

Another option would be to use "find" to get the creation time, see "man find", seaching for "ctime".

I hope this helps.

bakunin
# 6  
Old 12-04-2014
The following works in bash and zsh:
Code:
diff <(gzip -cd file1.tar.gz | tar tvf -) <(gzip -cd file2.tar.gz | tar tvf -)

(ksh works, too, but I get notifiers from bg processes.)
Make a script or function!
Example:
Code:
tarzdiff() {
 diff <(gzip -cd "$1" | tar tvf -) <(gzip -cd "$2" | tar tvf -)
}

Code:
tarzdiff file1.tar.gz file2.tar.gz


Last edited by MadeInGermany; 12-04-2014 at 01:33 PM..
This User Gave Thanks to MadeInGermany For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

GNU TAR vs NATIVE AIX TAR

Hello, Getting this very strange error, made tar/zip through gnu tar GNU Tar ( successful tar and zip without any errors ) /opt/freeware/bin/tar cvf - /oraapp| gzip > /backup/bkp_15_6_16_oraapp.tgz GNU unTar error root@test8:/>gunzip < /config1/bkp_15_6_16_oraapp.tgz |... (5 Replies)
Discussion started by: filosophizer
5 Replies

2. UNIX for Dummies Questions & Answers

How to tar a directory in AIX?

Hi i want to tar a directory.. i have tried few command but it is not working . please let me know how to tar and untar a directory below are the error which i am getting tar -zxvf tl11cp01_042414_071123.tar.gz tar: Not a recognized flag: z tar -zxvf... (3 Replies)
Discussion started by: scriptor
3 Replies

3. Shell Programming and Scripting

tar command to explore multiple layers of tar and tar.gz files

Hi all, I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies

4. UNIX for Advanced & Expert Users

Comparing experience with AIX, HP-UX, and Solaris

I'm investigating AIX/HP-UX/Solaris for use in a research environment. Although there is plenty of technical documentation online, some important questions can only be answered from long user experience. I'd like to hear whatever you can contribute if you can compare at least two of these. To... (16 Replies)
Discussion started by: wenp
16 Replies

5. AIX

AIX 4.2: tar using compression ?

Hi, is there a way to use compression on the TAR command running on a AIX 4.2 ? I did a "man tar" but did not see mentions of using compression, nor how to even find out the tar version. I want to look into ways of reducing the amount of time to do backups. One backup is dumping database... (9 Replies)
Discussion started by: Browser_ice
9 Replies

6. UNIX for Advanced & Expert Users

How to create a Tar of multiple Files in Unix and FTP the tar to Windows.

Hi, On my Unix Server in my directory, I have 70 files distributed in the following directories (which have several other files too). These files include C Source Files, Shell Script Source Files, Binary Files, Object Files. a) /usr/users/oracle/bin b) /usr/users/oracle... (1 Reply)
Discussion started by: marconi
1 Replies

7. AIX

copying files to a remote aix server using tar!

Hi, I am using AIX 5.2, and I want to copy some files from one server to a remote server using tar command. Can anybody tell me exact command? Thanks. Aqeel (2 Replies)
Discussion started by: system-admin
2 Replies

8. UNIX for Advanced & Expert Users

Untaring *.tar.tar files

Hi all, How to untar a file with .tar.tar extension. A utility that i downloaded from net had this extension. Thanks in advance, bubeshj. (6 Replies)
Discussion started by: bubeshj
6 Replies

9. AIX

How to tar a files that bigger than 2 gig in AIX 5.2?

Hi, I have a question. Im trying to tar a files that the size is bigger that 2 gig. When i tried to tar it, i got an error says "eached end-of-file before expected" How can i solve this? Thanks and Regards (6 Replies)
Discussion started by: owangecounty
6 Replies

10. UNIX for Dummies Questions & Answers

Comparing AIX and Solaris

Is Solaris still very hardware dependent? As in it is used mostly on SUN workstations and servers? What about IBM's AIX? Does it only work on IBM machines? Which is more popular and are there performance or usage differences? (1 Reply)
Discussion started by: CapsuleCorpJX
1 Replies
Login or Register to Ask a Question