Sponsored Content
Top Forums UNIX for Advanced & Expert Users how to unzip and extract tar file in single command Post 302153218 by Mr.Aketi on Monday 24th of December 2007 01:25:54 AM
Old 12-24-2007
Hi,

I believe this will be done by using the following command.

tar -zxvf test123.tar.gz

z -- unzip
x -- extract the file
v -- verbose
f -- forcefully done

Thanks and Regards,
Aketi
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

tar: extract single file to different filepath

Hi, This is my first post here - I'm hoping I can get some help! I have searched these forums and othersand not getting anything that works. I am trying to extract a single file from a tar archive to a diffierent location than it will default to. For example my tar log shows me ... a... (3 Replies)
Discussion started by: littleIdiot
3 Replies

2. UNIX for Dummies Questions & Answers

tar command help -- extract single file

Hi, I want to view/display the contents of one file in tar file. For example if the tar file is sam.tar.gz and one of the file inside is E1.txt, how do i view the contents of this E1.txt file. Olso if I want to extract the E1.txt file only from sam.tar.gz how can i do that. Thanks in... (7 Replies)
Discussion started by: icefish
7 Replies

3. Linux

Unzip selected files in .tar.gz file

Hi All, By accident, i deleted some files. Fortunately I have a backup backup.tar.gz files (750GB). It's too big for me to untar to get the file Is it possible that i could get the selected files in backup.tar.gz if i know exactly where the files are located. Thanks. Ken (1 Reply)
Discussion started by: trongkhuongsg
1 Replies

4. UNIX for Advanced & Expert Users

What is command to extract single file from an archieve?

I just want to extract one sigle file from an .ear archieve instead of extracting whole ear. Can anyone help me on this? (4 Replies)
Discussion started by: harshal_dcx
4 Replies

5. Shell Programming and Scripting

unzip single file and untar single file

Dear friends, My requirement below- 1] I have a zip file on unix server - ETL_Extracts_20100218175009.zip which is composed of various entity extracts namely... ENTITY1.txt, ENTITY2.txt, ENTITY3.txt etc.... How do I unzip only a single file ..say ENTITY2.txt from this zip file. CAn you... (2 Replies)
Discussion started by: sureshg_sampat
2 Replies

6. Shell Programming and Scripting

Single command - unzip files from a tar command

I have a tar file that contains multiple .Z files. Hence I need to issue a tar command followed by a gzip command to fully extract the files. How do I do it in a single command? What I'm doing now is tar xvf a.tar (this will output 1.Z and 2.Z) gzip -d *.Z (to extract 1.Z and 2.Z) (9 Replies)
Discussion started by: ericlim
9 Replies

7. Shell Programming and Scripting

Extract a single file from a tar file to another directory

Hi, I need to extract a single file from a tar file to another directory. So far I have this: This one extract a single file to same directory: tar -xvf filename.tar ./file.txt I tried this but its not working tar -xvf filename.tar /home/dir ./file.txt or this: (6 Replies)
Discussion started by: erin00
6 Replies

8. Shell Programming and Scripting

Extract a list of files using unzip command

Hi all, this is my first and i can't speak english well, so please be kind ! Here is my problem : I want to unzip a list of .zip files stored in one directory, so I though about using that : unzip '*.zip' Thing is that all of my zipped folders contain a file with the unique same name :... (6 Replies)
Discussion started by: remissssss
6 Replies

9. UNIX for Dummies Questions & Answers

Extract .zip file without using unzip,tar

Hi, Need to extract a file containing multiple .txt files without using tar/unzip as they are not available (1 Reply)
Discussion started by: santoshdrkr
1 Replies

10. UNIX for Beginners Questions & Answers

Tar and unzip on single command

Hi All, First of all I don't know whether this is possible. or no. Thought of getting experts thought. I am having a tar file which contains zipped file in it . I tried individual command with extraction and it worked tar -tvf TRANS_279.tar -rw-rw-r-- qqa00 1394 2016-10-03 10:39:19... (8 Replies)
Discussion started by: arunkumar_mca
8 Replies
CPANPLUS::Internals::Extract(3perl)			 Perl Programmers Reference Guide		       CPANPLUS::Internals::Extract(3perl)

NAME
CPANPLUS::Internals::Extract - internals for archive extraction SYNOPSIS
### for source files ### $self->_gunzip( file => 'foo.gz', output => 'blah.txt' ); ### for modules/packages ### $dir = $self->_extract( module => $modobj, extractdir => '/some/where' ); DESCRIPTION
CPANPLUS::Internals::Extract extracts compressed files for CPANPLUS. It can do this by either a pure perl solution (preferred) with the use of "Archive::Tar" and "Compress::Zlib", or with binaries, like "gzip" and "tar". The flow looks like this: $cb->_extract Delegate to Archive::Extract METHODS
$dir = _extract( module => $modobj, [perl => '/path/to/perl', extractdir => '/path/to/extract/to', prefer_bin => BOOL, verbose => BOOL, force => BOOL] ) "_extract" will take a module object and extract it to "extractdir" if provided, or the default location which is obtained from your config. The file name is obtained by looking at "$modobj->status->fetch" and will be parsed to see if it's a tar or zip archive. If it's a zip archive, "__unzip" will be called, otherwise "__untar" will be called. In the unlikely event the file is of neither format, an error will be thrown. "_extract" takes the following options: module A "CPANPLUS::Module" object. This is required. extractdir The directory to extract the archive to. By default this looks something like: /CPANPLUS_BASE/PERL_VERSION/BUILD/MODULE_NAME prefer_bin A flag indicating whether you prefer a pure perl solution, ie "Archive::Tar" or "Archive::Zip" respectively, or a binary solution like "unzip" and "tar". perl The path to the perl executable to use for any perl calls. Also used to determine the build version directory for extraction. verbose Specifies whether to be verbose or not. Defaults to your corresponding config entry. force Specifies whether to force the extraction or not. Defaults to your corresponding config entry. All other options are passed on verbatim to "__unzip" or "__untar". Returns the directory the file was extracted to on success and false on failure. perl v5.14.2 2014-09-29 CPANPLUS::Internals::Extract(3perl)
All times are GMT -4. The time now is 08:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy