Sponsored Content
Full Discussion: GZIP help, please!
Top Forums UNIX for Dummies Questions & Answers GZIP help, please! Post 38798 by alan on Friday 25th of July 2003 03:58:16 PM
Old 07-25-2003
IT WORKS! THANK YOU!

Okay, I am calm now but you have saved my behind so thank you!

Al.

Quote:
Originally posted by Perderabo
gzip -v9 -S .suf *.doc

says that the suffiz to use is .suf and the files to compress are *.doc. After that is finished you will have files that end in .doc.suf but for our purposes, the gzip suffix is .suf. That was a mistake, don't use -S. Let gzip pick its own suffix.

To decompess the result you need
gzip -d -S .suf <filelist>

where <filelist> is the list of files that you would like to decompress. To completely reverse what you did:
gzip -d -S .suf *.doc.suf

This may pick up a few files the were pre-existing with a name that ends in .doc.suf if you had any. But gzip will complain and move on to the next file.

And rather than "gzip -d", most of us would do "gunzip".
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

using gzip

Hi, I am trying to unzip a file that I unmounted onto a unix machine from a cd I had burned in a Windows machine. The file I am trying to unzip is a .tar file... it was originally a .tar.gz file because it was zipped using gzip. I have tried: % gzip -d hpux.tar (where hpux.tar is the file... (2 Replies)
Discussion started by: nattie_h
2 Replies

2. SCO

gzip

ciao a tutti, premesso che sono un principiante di unix, avrei bisogno di gzip/gunzip e SOPRATTUTTO delle istruzioni (ahimè dettagliatissime, come per un bimbo!) per installarlo... grazie mille, ciao (1 Reply)
Discussion started by: mfran2002
1 Replies

3. UNIX for Dummies Questions & Answers

gzip

Hi All, I have some files which are 01.tar.gz, 02.tar.gz,03.tar.gz ........30.tar.gz. when I want to extract the files I 'm using this command "gzip -dc *.tar.gz | tar -xvf -" but it just uncompress 01.tar.gz how can I uncompress all of them ? thanx alice (2 Replies)
Discussion started by: alisevA3
2 Replies

4. UNIX for Advanced & Expert Users

gzip with timestamp

Hi all, I have a file(Say x) and need to zip using gzip with the date&Timestamp(Something like x01012007.......) . Can you please tell me the command. Thanks (2 Replies)
Discussion started by: lijju.mathew
2 Replies

5. Shell Programming and Scripting

Gzip help

Hi Experts!! I was creating a zip file in a server which had zip installed in it. I have another server in which zip is not there and i am instructed to make use of gzip to compress files. I would need your help to know the way to create a gzip file. 1) I do the following to create the zip... (5 Replies)
Discussion started by: ganga.dharan
5 Replies

6. Shell Programming and Scripting

gzip

Hi, I want to gzip files in loop. for i in `ls *.xml`; do gzip $i; done But i am gettin error like "/usr/bin/ls: Arg list too long" Also please tell me how to do it with while loop and also using find and then exec. (7 Replies)
Discussion started by: tushar_tus
7 Replies

7. UNIX for Advanced & Expert Users

gzip vs pipe gzip: produce different file size

Hi All, I have a random test file: test.txt, size: 146 $ ll test.txt $ 146 test.txt Take 1: $ cat test.txt | gzip > test.txt.gz $ ll test.txt.gz $ 124 test.txt.gz Take 2: $ gzip test.txt $ ll test.txt.gz $ 133 test.txt.gz As you can see, gzipping a file and piping into gzip... (1 Reply)
Discussion started by: hanfresco
1 Replies

8. Shell Programming and Scripting

Help with GZIP

Hi Gurus, I have a requirement to zip a file using gzip and ftp it to target server. I am using a gzip script as below. gzip.sh #!/bin/ksh /usr/bin/gzip -9 $1 Filename for gzip.sh is passed by an application program. so the output for ./gzip.sh Test_YYYYMMDDHHMMSS.txt (file name is... (1 Reply)
Discussion started by: PRVARMA
1 Replies

9. Shell Programming and Scripting

gzip

how to zip all log file in a folder expect the latest gzip * ---> will zip all log files but I don't want the latest file to be zipped ex: file1, file2, file3, file4, file5 any single command to gzip all files excpet file5 ? (2 Replies)
Discussion started by: rmann
2 Replies

10. Shell Programming and Scripting

Gzip

if ;then echo "mrnet greater 5000" gzip /var/log/mrnet.log /var/log/mrnet.log.1.gz fi i'm looking if mrnet.log is bigger then 5000 then compress mrnet.log to mrnet.log.1.gz but it won't compress. (3 Replies)
Discussion started by: Froob
3 Replies
LZMA(1) 						      General Commands Manual							   LZMA(1)

NAME
lzma, unlzma, lzcat - LZMA compression and decompression tool SYNOPSIS
lzma [-123456789cdefhkLqtvV] [-S suffix] [filenames ...] unlzma [-cfhkLqtvV] [-S suffix] [filenames ...] lzcat [-fhLqV] [filenames ...] DESCRIPTION
LZMA (Lempel-Ziv-Markov chain-Algorithm) is an improved version of famous LZ77 compression algorithm. It was improved in way of maximum increasing of compression ratio, keeping high decompression speed and low memory requirements for decompressing. lzma command line tool has a similar interface to gzip(1) and bzip2(1) and is intended to make use of LZMA compression easy for the users who are already familiar with gzip and bzip2. In this manual lzma is compared mostly to bzip2 because that is currently one of the most widely used free software to compress tar files made for distribution. Comparing lzma to gzip is not practical because neither lzma nor bzip2 can compete with gzip in compression speed. On the other hand the compression ratio of gzip is worse than of lzma and bzip2. lzma provides notably better compression ratio than bzip2 especially with files having other than plain text content. The other advantage of lzma is fast decompression which is many times quicker than bzip2. The major disadvantage is that achieving the highest compression ratios requires extensive amount of system resources, both CPU time and RAM. Also software to handle LZMA compressed files is not installed by default on most distributions. When compressing or decompressing with lzma, the new file will have the same ownership information, permissions and timestamps as the orig- inal file. However the this information is not stored into the compressed file like gzip does. STREAMED VS. NON-STREAMED LZMA files can be either streamed or non-streamed. Non-streamed files are created only when the size of the file being compressed is known. In practice this means that the source file must be a regular file. In other words, if compressing from the standard input or from a named pipe (fifo) the compressed file will always be streamed. Both streamed and non-streamed files are compressed identically; the only differences are found from the beginnings and ends of LZMA com- pressed files: Non-streamed files contain the uncompressed size of the file in the LZMA file header; streamed files have uncompressed size marked as unknown. To know where to stop decoding, streamed files have a special End Of Stream marker at the end of the LZMA file. The EOS marker makes streamed files five or six bytes bigger than non-streamed. So in practice creating non-streamed files has two advantages: 1) the compressed file is a few bytes smaller and 2) the uncompressed size of the file can be checked without decompressing the file. OPTIONS
Short options can be grouped like -cd. -c --stdout --to-stdout The output is written to the standard output. The original files are kept unchanged. When compressing to the standard output there can be only one input file. This option is implied when input is read from the standard input or the script is invoked as lzcat. -d --decompress --uncompress Force decompression regardless of the invocation name. This the default when called as unlzma or lzcat. -f --force Force compression or decompression even if source file is a symlink, target exists, or target is a terminal. In contrast to gzip and bzip2, if input data is not in LZMA format, --force does not make lzma behave like cat. lzma never prompts if target file should be overwritten; existing files are skipped or, in case of --force, overwritten. -h --help Show a summary of supported options and quit. -k --keep Do not delete the input files after compression or decompression. -L --license Show licensing information of lzma. -q --quiet Suppress all warnings. You can still check the exit status to detect if a warning had been shown. -S --suffix .suf Use .suf instead of the default .lzma. A null suffix forces unlzma to decompress all the given files regardless of the filename suffix. -t --test Check the integrity of the compressed file(s). Without --verbose no output is produced if no errors are found. -v --verbose Show the filename and percentage reduction of each processes file. -V --version Show the version number of lzma. -z --compress Force compression regardless of the invocation name. -1 .. -9 Set the compression ratio. These options have no effect when decompressing. --fast Alias to -1. --best Alias to -9. DIAGNOSTICS
Exit status: 0 - Everything OK. 1 - An error occurred. 2 - Something worth a warning happened but no errors. It can be especially useful with tar(1) patched to support LZMA compression. AUTHORS
The LZMA algorithm and the implementation used in LZMA utils was developed by Igor Pavlov. The original code is available in LZMA SDK which can be found from http://7-zip.org/sdk.html . lzma command line tool was written by Ville Koskinen. http://tukaani.org/lzma/ This manual page is inspired by manual pages of gzip and bzip2. SEE ALSO
gzip(1), bzip2(1) LZMA utils 23 Dec 2005 LZMA(1)
All times are GMT -4. The time now is 12:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy