raaj4354
asked on
Script to compare tar files
using cygwin on windows and trying to compare two tar files and to print out the difference between them.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Do you just want to compare the filenames that are in the .tar files? That is what the diff above is doing. If you want to compare the files then you'd have to find files with the same name in tar1 and tar2 first and then compare each file. To do this you need to untar both archives as well.
Actually the above diff has a good chance of finding file changes because of using tar -tvf. The v means you get file size and modification date - quite a good indication of any change although not rigorous.
To only compare file names, use tar -tf
To only compare file names, use tar -tf
ASKER
I need to compare the file contents of two tar files and list the names of the different files(diff in content) and any new files in either tar files.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.