Sponsored Content
Operating Systems OS X (Apple) Decompressing Tar Archives (Finally!) Post 302299841 by TonyFullerMalv on Saturday 21st of March 2009 05:11:58 PM
Old 03-21-2009
Using command line makes this task a lot simpler:
Code:
# gunzip -c filename.tar.gz | tar xvf -

This uncompresses and extracts the contents of the tar file in one go and leaves the original *.tar.gz file still compressed.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

tar archives

I have a tar archive which I believe may be corrupted, produced on an HP-UX 10.x box and written to a 4mm DDS-3 tape. I understand that gnu tar has a -W (--verify) option which will attempt to verify the archive after it has been created. Am I right in saying that this option cannot be used to... (4 Replies)
Discussion started by: sam_pointer
4 Replies

2. UNIX for Dummies Questions & Answers

segmenting tar archives

assuming i need to create a tar archive which would turn out to be bigger than 2gb, how could i segment the archive into say, 1 gb parts? (3 Replies)
Discussion started by: crudealien
3 Replies

3. Shell Programming and Scripting

To view .gz files without decompressing it

hi, I have a file called Archiver1.gz how to view this file without doing gunzip on it i.e. decompressing it i tried this command but its not working: gzcat Archiver1.gz | tail -10 (4 Replies)
Discussion started by: ali560045
4 Replies

4. UNIX for Dummies Questions & Answers

tar -cvf test.tar `find . -mtime -1 -type f` only tar 1 file

Hi all, 4 files are returned when i issue 'find . -mtime -1 -type f -ls'. ./ora_475244.aud ./ora_671958.aud ./ora_934052.aud ./ora_934050.aud However, when I issued the below command: tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies

5. Solaris

read a compress file without decompressing it

If we have a zip file and we don't have enough space on the disk to unzip it but we want to be able to just read the file like if we can use cat without decompressing it. Is there a way we can do that? Like if we want Thanks, (1 Reply)
Discussion started by: Pouchie1
1 Replies

6. Shell Programming and Scripting

Create unique tar archives from a list of directories

I'm looking to archive a client directory from a CIFS share There are multiple directories that will be stored in a text file and I'm looking to create an individual tar archive of each folder in the directory. I've tried a number of commands to no avail. Here's what I would like. ... (2 Replies)
Discussion started by: Steelysteel
2 Replies

7. Shell Programming and Scripting

tar command to explore multiple layers of tar and tar.gz files

Hi all, I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies

8. UNIX for Dummies Questions & Answers

Find Multiple Strings from a list of *.gz files withour decompressing...

Hello Team, There is this situation where there are around 20 *.gz files and i want to search multiple words from all those files. Example as below : filea.gz fileb.gz filec.gz now i want to search words "hi" and "hello" from all these 3 files without... (4 Replies)
Discussion started by: varun87
4 Replies

9. UNIX for Advanced & Expert Users

Multi-Volume tar archives. [solved]

Hi, The only off-line storage medium I have is DVD. I am trying to back up around 10G of data and if I can achieve a practical solution I will use it more generally. I am currently considering something along the lines of: tar --create --multi-volume --tape-length=nnnn <pathspec> |... (0 Replies)
Discussion started by: MikeGM
0 Replies

10. Shell Programming and Scripting

Tar archives monthly

Hi, I want to archive files by month, is there anyway of this code looks better? find /tmp/w/ -type f -newermt '2014-01-01' ! -newermt '2014-02-01' | xargs tar -czvf files01.tar find /tmp/w/ -type f -newermt '2014-02-01' ! -newermt '2014-03-01' | xargs tar -czvf files02.tar find... (9 Replies)
Discussion started by: prpkrk
9 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 01:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy