amiga.org
     
iconAll times are GMT -6. The time now is 09:18 AM. | Welcome to Forum, please register to access all of our features.

» Amiga.org » The "Not Quite Amiga but still computer related category" » Alternative Operating Systems » tarball or gzip doing on unix

Alternative Operating Systems This forum is dedicated to discussions of alternatives to the Commodore Amiga Platform, such as Linux distributions, FreeBSD, OpenBSD, and others.

Reply
 
Thread Tools Display Modes
Old 07-21-2004, 04:18 AM   #1
weirdami
Desperately needs a life
Points: 17,281, Level: 83 Points: 17,281, Level: 83 Points: 17,281, Level: 83
Activity: 1% Activity: 1% Activity: 1%
 
weirdami's Avatar
 
Join Date: Jan 2003
Posts: 3,755
Blog Entries: 1
Default tarball or gzip doing on unix

How do I do one of those tar ball things or gzip dealies on a unix system? I have an email directory on Sparc something, and I want to squish up all the emails into one file.

Really, I suppose, I want to be able to type in a command that indicates which directory to archive, and have it archive all the files into one file, rather than into a bunch or individually archived files, which seems to be all I know how to do. :-(

man files are evil, which is why I'm asking you knowledgible folks. :-)


-edit-
Hey, check me out, cult member!
weirdami is offline   Reply With Quote
Old 07-21-2004, 04:40 AM   #2
elendil
Technoid
Points: 5,541, Level: 47 Points: 5,541, Level: 47 Points: 5,541, Level: 47
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2002
Posts: 324
Send a message via ICQ to elendil
Default Re: tarball or gzip doing on unix

Quick answer: tar czf <filename> <dir to be tarred>.

a bit longer:
c - create archive
z - gzip compression
f - filename

You don't need z if you don't want it compressed. Using x (extract archive) instead of c does the opposite when you want your files back.

I don't know, but I'm sure it's also possible to either use wildcards or just type the list of files you want to have tarred instead of <dir to be tarred>, if you prefer.

Sincerely,

-Kenneth Straarup.

EDIT: the flags can come in any order, btw, cfz fzc, etc, afaik. It may depend on tar implementation, though.
elendil is offline   Reply With Quote
Old 07-21-2004, 04:46 AM   #3
Jope
Defender of the Faith
Points: 10,153, Level: 67 Points: 10,153, Level: 67 Points: 10,153, Level: 67
Activity: 1% Activity: 1% Activity: 1%
 
Join Date: Sep 2002
Posts: 1,112
Default Re: tarball or gzip doing on unix

Sparc something would indicate solaris, so the z flag might not work.

Just leave it out and then do a gzip -9 file.tar after you've rolled up the package.

Edit: Wow, I've turned into a cult member too.. :-D
Jope is offline   Reply With Quote
Old 07-21-2004, 07:36 AM   #4
Failure
Lifetime Member
Points: 8,150, Level: 60 Points: 8,150, Level: 60 Points: 8,150, Level: 60
Activity: 1% Activity: 1% Activity: 1%
 
Failure's Avatar
 
Join Date: Jun 2004
Location: Atlanta, GA
Posts: 323
Blog Entries: 6
Send a message via ICQ to Failure Send a message via AIM to Failure Send a message via MSN to Failure
Default Re: tarball or gzip doing on unix

Quote:
Jope wrote:
Sparc something would indicate solaris, so the z flag might not work.
You are correct! Without the GNU version of tar being used, the -z or -j flag for compression won't work. However, instead of tarring and then gzipping, do it all at once with:

tar -cf - directory_to_be_tarred | gzip -9 > whatever.tar.gz

For transit on a DOS floppy (like say, to an Amiga) use .tgz instead of .tar.gz
--
Failure
Failure is offline   Reply With Quote
Old 07-21-2004, 04:16 PM   #5
weirdami
Desperately needs a life
Points: 17,281, Level: 83 Points: 17,281, Level: 83 Points: 17,281, Level: 83
Activity: 1% Activity: 1% Activity: 1%
 
weirdami's Avatar
 
Join Date: Jan 2003
Posts: 3,755
Blog Entries: 1
Default Re: tarball or gzip doing on unix

Thanks, guys, it worked first time. That -z thing wasn't in the -h, so I guess you were right about it not being on Solaris. Hadda gzip. Now my many emails take up tiny space. :-)
weirdami is offline   Reply With Quote
Old 07-21-2004, 06:24 AM   #6
Ilwrath
Kindred of Babble-on
Points: 12,069, Level: 72 Points: 12,069, Level: 72 Points: 12,069, Level: 72
Activity: 1% Activity: 1% Activity: 1%
Zookeeper Champion
 
Ilwrath's Avatar
 
Join Date: Mar 2002
Posts: 2,184
Default Re: tarball or gzip doing on unix

Quote:
Hey, check me out, cult member!
Crow, you seem kind of different... ;-)
Ilwrath is offline   Reply With Quote
Reply

Bookmarks

Tags
unix , tarball , gzip

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Which Unix/Linux for AmigaOne ? CLS2086 Linux PPC discussion 3 07-25-2009 11:48 AM
Tell me about Unix X-ray CH / General 12 04-14-2009 03:10 PM
UNIX for Amiga? Anyone tried it? Amithony Amiga Hardware Issues and discussion 5 12-01-2008 08:22 AM
OT: Microsoft's UNIX asian1 Alternative Operating Systems 6 11-08-2003 01:08 PM
Analogy: Amiga and UNIX jtsiren Alternative Operating Systems 18 02-15-2003 11:12 AM