Compare 2 files tar.lzo with/without extracting

Hi Guys,

I have 2 compressed files tar.lzo and having many subdirectories inside it.
I would like to know which files having the difference in terms of size/content.
I am using bash shell and unix server

example:-

file1 :- abc.tar.lzo
file2 :- xyz.tar.lzo

Result:-

/home/ashu/file.txt 345k  (from abc.tar.lzo)
/home/ashu/file.txt 678k  (from xyz.tar.lzo)

Something like that.

Thanks,
Himanshu

As has been noted several times in your previous threads:

  1. Always tell us what operating system you're using.
  2. Always tell us what shell you're using.
  3. Always use CODE tags when displaying sample input, sample output, and code segments.

And, in this case, tell us what command you use to get the sizes of files in a file with the filename extensions .tar.lzo on your system and show us the output you get (in CODE tags) when using that command on one of your sample input files.

1 Like

Thanks for telling me this. I have updated my post with shell name and OS type

Which UNIX server?

And, when are you going to tell us what command you use to get the sizes of files in a file with the filename extensions .tar.lzo on your system and show us the output you get (in CODE tags) when using that command on one of your sample input files.

I'm fairly sure that you cannot get access to the checksum via any lzop query command, so you will have to either rely solely on the file date/time and size or you will need to extract the data to compare the content.