The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script for zipping a file jayaramanit Shell Programming and Scripting 4 08-06-2008 06:47 AM
zipping files shary Shell Programming and Scripting 3 07-21-2008 05:58 AM
Zipping files older than one month ramky79 Shell Programming and Scripting 2 04-07-2008 04:39 PM
Help me While zipping the file Jolly UNIX for Advanced & Expert Users 7 05-11-2007 10:05 AM
tar'ing and zipping files FredSmith UNIX for Dummies Questions & Answers 4 05-02-2006 03:09 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-06-2009
prakash.gr prakash.gr is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 32
zipping all the tar files to singlr file in directory

Hi,

i have more than 300 tar files in directory and i want to zip all tar files to single file.

could anybody tell me the command since i know how to do zip for single tar file:

bash-3.00$gzip 2008_11_10.tar

bash-3.00$ pwd
/oracle1/archivebackup


in this directory i have lot files and i want to make single zip file.

Thanks

Prakash
  #2 (permalink)  
Old 01-06-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,789
Code:
tar -cf - *.tar | gzip -c9 > everything.tar.gz
  #3 (permalink)  
Old 01-06-2009
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,909
That might deserve a little more explanation. gzip does not support multiple files, it's purely for stream compression. tar, on the other hand, does not compress, but is great at bundling files together into a stream while preserving all their attributes. This is why they are so frequently friends.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 11:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0