Sponsored Content
Top Forums UNIX for Dummies Questions & Answers compress/decompress don't take you back to the same file Post 302283151 by chebarbudo on Monday 2nd of February 2009 05:09:25 PM
Old 02-02-2009
Question 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:
Code:
me:~# # Duplicate the archive ---------------------------------
me:~# cp system.tgz system.01.tgz
me:~# ls -l system.tgz system.01.tgz
-rw-r--r-- 1 root root 274650447 2009-02-02 22:41 system.01.tgz
-rw-r--r-- 1 root root 274650447 2009-02-02 21:32 system.tgz
me:~#
me:~# # Unzip the archive -------------------------------------
me:~# mkdir system.01/
me:~# tar -zxf system.01.tgz -C system.01/
me:~#
me:~# # Rezip the archive -------------------------------------
me:~# cd system.01/
me:~/system.01# tar -zcf system.01.tgz *
me:~/system.01# mv system.01.tgz ../
me:~/system.01# cd ..
me:~#
me:~# # Compare with previous archive -------------------------
me:~# ls -l system.tgz system.01.tgz
-rw-r--r-- 1 root root 274642873 2009-02-02 22:54 system.01.tgz
-rw-r--r-- 1 root root 274650447 2009-02-02 21:32 system.tgz

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
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

[help] Cant compress file

Anybody know what happened here? 162 lab2-36:~/try_direct/another> compress url.txt url.txt: -- file unchanged (8 Replies)
Discussion started by: endeavour1985
8 Replies

2. UNIX for Advanced & Expert Users

compress more than one file

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)
Discussion started by: prasee
2 Replies

3. UNIX for Dummies Questions & Answers

Decompress a .SP file

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)
Discussion started by: jeco
3 Replies

4. Shell Programming and Scripting

unix script to takes the old data from a TXT file and compress them into new file

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)
Discussion started by: vpandey
2 Replies

5. UNIX for Dummies Questions & Answers

Using gunzip to decompress .zip file

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)
Discussion started by: syang68
1 Replies

6. UNIX for Dummies Questions & Answers

Issue: Compress in unix server and FTP to windows and open the compress file using Winzip

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)
Discussion started by: sakthifire
4 Replies

7. Shell Programming and Scripting

Decompress (with gunzip) recursively, but do not delete original gz file

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)
Discussion started by: gansvv
3 Replies

8. UNIX for Dummies Questions & Answers

Please, I want to decompress a file.bin "firmware"

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)
Discussion started by: samy2012
0 Replies

9. Shell Programming and Scripting

Tar to decompress and to convert file to .dat format

tar -tvf abc.tar.gz gives me the file name abc.Is it possible to rename the file to abc.dat while decompressing using tar ? Thanks. (2 Replies)
Discussion started by: vedanta
2 Replies
UUENCODE(1)						    BSD General Commands Manual 					       UUENCODE(1)

NAME
uuencode, uudecode -- encode/decode a binary file SYNOPSIS
uuencode [-m] [inputfile] outputname uudecode [-m | -p] [encoded-file ...] DESCRIPTION
uuencode and uudecode are used to transmit binary files over transmission mediums that do not support other than simple ASCII data. The following options are available: -m Use base64 encoding. uuencode reads inputfile (or by default the standard input) and writes an encoded version to the standard output. The encoding uses only printing ASCII characters and includes the mode of the file and the operand outputname for use by uudecode. uudecode transforms uuencoded files (or by default, the standard input) into the original form. The resulting file is named outputname as recorded in the encoded file, and will have the mode of the original file except that setuid and execute bits are not retained; if the -p option is specified, the data will be written to the standard output instead. uudecode ignores any leading and trailing lines. EXIT STATUS
The uudecode and uuencode utilities exits 0 on success, and >0 if an error occurs. EXAMPLES
The following example packages up a source tree, compresses it, uuencodes it and mails it to a user on another system. tar czf - src_tree | uuencode src_tree.tgz | mail user@example.com On the other system, if the user saves the mail to the file temp, the following example creates the file src_tree.tgz and extracts it to make a copy of the original tree. uudecode temp tar xzf src_tree.tgz SEE ALSO
gzip(1), mail(1), tar(1), uuencode(5) STANDARDS
The uudecode and uuencode utilities conform to IEEE Std 1003.2-1992 (``POSIX.2''). HISTORY
The uudecode and uuencode utilities appeared in 4.0BSD. BUGS
The encoded form of the file is expanded by 35% (3 bytes become 4 plus control information). BSD
November 30, 2008 BSD
All times are GMT -4. The time now is 11:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy