Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Help tar'ing files

Help tar'ing files
Thread Tools
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status: Offline
Reply With Quote
Mar 11, 2001, 11:42 PM
 
I have written an app in Java that I would like to compress using tar so that I can post it on the internet for download. Does anyone know how I do this? I want to tar a directory that has the app and a readme file in it.
     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Mar 12, 2001, 08:39 AM
 
Let's say you have a folder named foo

You'd go to that directory in the Terminal, then type

tar cvf foo.tar foo

For additional compression (tar.gz) use

gzip foo.tar

And you'll have foo.tar.gz
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status: Offline
Reply With Quote
Mar 12, 2001, 09:14 AM
 
Thank you! Worked great!
     
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status: Offline
Reply With Quote
Mar 12, 2001, 10:44 AM
 
Actually, gnutar has a gzipping feature built into it so you could just type:

gnutar -czvf foo.tar.gz foo

Note the z parameter added to the commands. I don't think that tar has this feature, but I'm not sure.
     
   
Thread Tools
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -5. The time now is 09:53 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2