The UNIX and Linux Forums  

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
how to tar a directory in a sun solaris? mmb SUN Solaris 7 05-19-2008 08:03 AM
Usage of /var/tmp/ directory on Solaris 10 patilmuragesh SUN Solaris 1 12-12-2007 09:31 AM
compress Directory deep_kol Shell Programming and Scripting 9 11-29-2007 09:12 PM
compress disk on Solaris 9 gandolf989 SUN Solaris 2 01-05-2007 01:59 PM
How to Compress files before moving them in a directory godalle Shell Programming and Scripting 3 11-10-2005 08:59 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 08-22-2003
Registered User
 

Join Date: Feb 2002
Posts: 5
How to compress a directory on a Sun Solaris 5.7 ?

Hi,

Is there any utility to compress an entire directory on a Sun Solaris 5.7 ? Something like "compressdir" on other flavours of Unix ?

Thanks
Forum Sponsor
  #2  
Old 08-22-2003
google's Avatar
Moderator
 

Join Date: Jul 2002
Location: Atlanta
Posts: 740
Check out the tar command or cpio command. Both will archive directories. Once you have created the tar-ball you can then gzip it! On Solaris, there is a program called pax though I have never used it.
  #3  
Old 08-22-2003
pressy's Avatar
solaris cultist
 

Join Date: Aug 2003
Location: Vienna / Austria (Europe) [EARTH]
Posts: 718
......

i think tar does what you want....
search the man page for more information

this is a solaris question and should be posted in our new solaris forum (thx to neo) ;-)
.
  #4  
Old 08-22-2003
Registered User
 

Join Date: Feb 2002
Posts: 5
Thanks

Thanks google and pressy for your prompt response.

google -> My server does not have much space and backing up on tape would have taken much time and anyway, I wanted free space temporarily. Hence, I was looking for something, which would compress contents of all sub-directories.
gzip is available on our server, which has an option -r, which recursively compresses all files of a specified directory.

Pressy - > This topic should have been opened in Solaris forum. Please excuse me.
  #5  
Old 08-22-2003
Registered User
 

Join Date: Aug 2003
Location: Dover, DE, USA
Posts: 31
Re: Thanks

Quote:
Originally posted by sameerdes
My server does not have much space and backing up on tape would have taken much time and anyway, I wanted free space temporarily. Hence, I was looking for something, which would compress contents of all sub-directories.
gzip is available on our server
Tar is more than a tape backup program. Tar w/ gzip installed on the server would be able to create a compressed recursive backup of directory that you need backed up. I use this quite frequently when I need a quick backup of a website. I believe tar is recursive from the directory that you started down the tree.

try using:

"tar -cpz * > filename.tar.gz"

I used * as wildcard to take everything in the dir i am in and everythign underneath it, but you can specify any file or dir that you want.
Google The UNIX and Linux Forums
Closed Thread

Tags
cpio

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:09 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0