Tar and unzip on single command

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Tar and unzip on single command
# 8  
Old 06-17-2017
I' m remember that jar command manage also zip archive and can to work with stream:
Code:
$ tar xf arch.tar --to-command="jar tv"
   283 Sat Jun 17 01:54:41 CEST 2017 fich1.txt
   204 Sat Jun 17 01:54:54 CEST 2017 fich2.txt
   487 Sat Jun 17 01:55:34 CEST 2017 fich3.txt
   974 Sat Jun 17 01:56:01 CEST 2017 fich4.txt

Regards.
This User Gave Thanks to disedorgue For This Post:
# 9  
Old 06-18-2017
Quote:
Originally Posted by disedorgue
I' m remember that jar command manage also zip archive and can to work with stream:
Code:
$ tar xf arch.tar --to-command="jar tv"
   283 Sat Jun 17 01:54:41 CEST 2017 fich1.txt
   204 Sat Jun 17 01:54:54 CEST 2017 fich2.txt
   487 Sat Jun 17 01:55:34 CEST 2017 fich3.txt
   974 Sat Jun 17 01:56:01 CEST 2017 fich4.txt

Regards.
It would still be extracting and the GNU extension may not be even available.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to supress output from tar and unzip commands?

I have the below two commands in my script. tar -xf hello.tar unzip -o tempp.zip When i run the script i see the below on my standard out. How can i suppress output coming from both the tar and unzip on my standard output. (3 Replies)
Discussion started by: mohtashims
3 Replies

2. 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

3. 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

4. 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

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. AIX

how to unzip wget-latest.tar.gz

I download wget-latest.tar.gz from Index of /gnu/wget, however, it saved in my windows as wget-latest.tar.tar After I ftp it to aix server, #file wget-latest.tar.tar wget-latest.tar.tar: data or International Language text how to uzip it? ---------- Post updated at 04:13 PM ----------... (3 Replies)
Discussion started by: rainbow_bean
3 Replies

7. 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

8. 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

9. UNIX Desktop Questions & Answers

file zip,rar,tar,compress,uncompress,unzip,unrar

i want know how to compress and uncompress file using unix, compress uncompress,zip,unzip,rar,unrar,how its work and more about this.:confused: (1 Reply)
Discussion started by: ismael xavier
1 Replies

10. UNIX for Advanced & Expert Users

how to unzip and extract tar file in single command

In order to save diskspace and avoid of disk full during unzip then extract the tar file is there any tar unzip command would unzip and extract tar at the same time (test123.tar.gz) thank in advance (6 Replies)
Discussion started by: darkrainbow
6 Replies
Login or Register to Ask a Question