compress/decompress don't take you back to the same file
Hi there,
I have a file system.tgz. I want to make changes inside this archive but before that, I want to be sure I recompress it in the exact same format.
So I did the following:
As you can see, the archive is not exactly as it was. Maybe I'm not using the same compression level? But I have no idea how to set this parameter.
Thanks for your help.
Santiago
Hi,
without analysing it too much,
have You examined that the pathnames stored in the files are the same? If You change the name of a directory it is compressed from it will affect the compression since size and sequence of characters differ and pathnames are stored in the compressed file.
Just a thought.
Ok, well that was just my first idea, that since tar contains META information, there are a lot of thing that could affect the final size of an archive. I wouldn't trust tar size alone as the criteria.
Are the files created with the same version of tar?
/L
Thanks Lakris,
You are right. I knew very few about tars before I had this problem.
So I explored in details the content of the archives using
1) Path, attributes and size are strictly identical before and after decompression/recompression.
2) Dates can be different:
- regular files, block and character devices, hard links and named pipes always keep the same date
- symbolic links never keep the same date. Actually they get the current time of decompression.
- I was not able to build any theory about directories
3) Owners are different in some cases. I assume that only UID/GID is kept for the owner. So if the archive comes from another system (which is my case), UID/GID can result in a different username/groupname.
If anyone has serious knowledge about tars, can he/she confirm what I said?
Can this explain the difference between the original archive and the one resulting of a decompression/recompression?
Please, help me
Please, I want to decompress a file firmware
for a 2000 SAT HD Please note that I use Version ubuntu 10.04 lts
file name :
..................
NxpRom.bin
..................
Or
How do I use and is... (0 Replies)
Hi all,
I have a folder hierarchy with many gz files in them. I would like to recursively decompress them, but keep the original files. I would also like to move all the decompressed files (these are very large HDF5 files with .CP12 extension) to another data folder.
Currently I am using four... (3 Replies)
Hi All !
We have to compress a big data file in unix server and transfer it to windows and uncompress it using winzip in windows.
I have used the utility ZIP like the below.
zip -e <newfilename> df2_test_extract.dat
but when I compress files greater than 4 gb using zip utility, it... (4 Replies)
Hi,
I have a zipped Oralce software (linux.x64_11gR1_database.zip) and I need to unzip it. On the Linux server, I only see the gunzip utility listed:
$ ls -ltr *zip*
-rwxr-xr-x 3 root root 60320 Jan 15 2008 gzip
-rwxr-xr-x 3 root root 60320 Jan 15 2008 gunzip
Can I use the command... (1 Reply)
Hi,
I am looking for the unix script which can takes the 2 month old data from a TXT file (there is one txt file in whiche messages are appended on daily basis) and compress them into new file.Please halp me out. (2 Replies)
Hi to all, I'm new in this forum and I just need a quick answer from the experts out there, I have a 2761.sp file, in short a ".SP" file, it was given to me compressed, and I need to decompress it before Monday. I saw a software named Splint, but it shows an error, a DMI error message, so I dont... (3 Replies)
hi,
I need to compress a couple files in a directory.i tried using
tar cvf filename1 filename2
but i am not able to open tar file.
please suggest how to compress more than one file in to same file
thanks in advance (2 Replies)