uncompress tar.gz files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting uncompress tar.gz files
# 1  
Old 07-07-2010
uncompress tar.gz files

i Have 150 tar.gz files and i need to uncompress and extract all the files from those 150 tar.gz and i will have 150 files on daily basis.

could any one help me out with the script to uncompress tar.gz files.
# 2  
Old 07-07-2010
Code:
gzip -d *.tar.gz
tar xvf *.tar

# 3  
Old 07-08-2010
Code:
tar -xzvf filename.tar.gz

# 4  
Old 07-08-2010
tar xvf *.tar or tar xvf filename.tar does work only when there is only one tar file in the folder, if i have more than 1 file and if i have enter a file name manullay all the time it doesn't work out that way.
# 5  
Old 07-08-2010
Code:
for file in *.tar.gz; do tar -zxf $file; done

# 6  
Old 07-08-2010
tar xvf /cuff/source/sources1/abc/*.tar

when i write this command, it does nothing.

but when in abc folder and when i execute tar xvf filename1.tar, it does extract all the files in that tar.

but i can't do it by filename, because i have 100 files
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Uncompress several tar.gz files inside several folders

Hi, I need to uncompress sevral tar.gz files that are located insides sevral folders using a shell script. Folder tree looks like this : /folder/001 /folder/002 /folder/003 Inside each folder dossier (001,002,003) we can find 1 or several tar.gz files. I've scripted something... (9 Replies)
Discussion started by: shellX
9 Replies

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

3. Solaris

Cannot uncompress the tar.gz

I've downloaded the tomcat from http://archive.apache.org/dist/jakarta/tomcat-5/v5.0.30/bin/ at window 2000 and then ftp to Solaris 5.9 in binary mode. gunzip -c jakarta-tomcat-5.0.30.tar.gz | tar -xvf - tar: directory checksum error if try this one, gzip -d jakarta-tomcat-5.0.30.tar.gz... (2 Replies)
Discussion started by: sbox
2 Replies

4. Shell Programming and Scripting

uncompress a group of files

i have some 100's of files in the format .tar.gz. how to uncompress them in a single shot i have sorted the files according to current date and now they reside in a dir called naveed1. cd naveed1 ls -ltr file1.tar.gz file2.tar.gz : : : file100.tar.gz how to uncompresse them in... (8 Replies)
Discussion started by: ali560045
8 Replies

5. Shell Programming and Scripting

Listing uncompress and compress files

How can i list uncompress files and compress those and also vice versa suppose im listing the compressed files as ls -ltr *.Z. how can i list the uncompressed files using not *.Z. (1 Reply)
Discussion started by: laknar
1 Replies

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

7. HP-UX

uncompress of PKZIP files on HPUX

Hi All, is there any command to unzip the compressed files compressed using PKZIP on HP-UX. We dont have unzip. and gunzip or compress commands are not working. is there any other to do this? Thank you very much for the help. Regards, Srinivas (3 Replies)
Discussion started by: srinivas_paluku
3 Replies

8. Shell Programming and Scripting

rsh and uncompress and tar

Hello, how can I send a compressed file (file.tar.Z) on another server ans uncompresse and extract it there ? My code which is like this uncompress *tar.Z | rsh serveurB -l user1 "cd /d15/store/; tar xf -" does not function. Many thanks before. (4 Replies)
Discussion started by: big123456
4 Replies

9. UNIX for Dummies Questions & Answers

uncompress files

I get a compressed file for linux and I want to uncompress it in Unix. Is that possible? I try with te command uncompress but it didnīt work. T.hanks (3 Replies)
Discussion started by: diegoe
3 Replies

10. UNIX for Dummies Questions & Answers

uncompress pkzip files

Are there any unix/linux tools that can uncompress the "pkzip" files from DOS env. Thanks . (2 Replies)
Discussion started by: Wing m. Cheng
2 Replies
Login or Register to Ask a Question