Unix Technical Forum

Re: tar and gzip

This is a discussion on Re: tar and gzip within the HP-UX Operating System forums, part of the Unix Operating Systems category; --> To copy files to a tarball and gzip at the same time. tar cvf - ? | gzip -9> ...


Go Back   Unix Technical Forum > Unix Operating Systems > HP-UX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 05:46 PM
Doug Burton
 
Posts: n/a
Default Re: tar and gzip

To copy files to a tarball and gzip at the same time.
tar cvf - ? | gzip -9> filename.tar.gz

NOTE:
The question mark (?) is really supposed to be there.


On Tue, 8 Jul 2003 13:24:45 -0500, "LHradowy"
<laura.hradowy@NOSPAM.mts.ca> wrote:

>Let me get this correct...
>If I tar cvf file.tar| gzip it creates a tar file in memory (or on
>disk?) then pipes it to gzip to compress it. So if I have a directory the
>has 8 GB in size and I want to tar and compress it, I would tar the file to
>8GB in size the compress it. So in essence I need an additional 8 GB of
>space?
>
>Does tar -cvzf file.tar compress as it tars, does it need additional size
>allocation?
>
>I get an error when I try to tar -cvzf a file, saying the z in not a valid
>variable. Does this mean I need to install GNUgzip?
>
>


Doug
----------------------------------------------------------------------
http://home.tampabay.rr.com/batcave/unixnotes.htm
http://home.tampabay.rr.com/batcave/ServerBuilds.htm
http://home.tampabay.rr.com/batcave/ignite.htm
http://home.tampabay.rr.com/batcave/GSPinfo.htm
http://home.tampabay.rr.com/batcave/inetd_conf.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2008, 05:46 PM
Barry Margolin
 
Posts: n/a
Default Re: tar and gzip

In article <3f0d359d.1163032@news-server.tampabay.rr.com>,
Doug Burton <dburton30@hotmail.com> wrote:
>To copy files to a tarball and gzip at the same time.
>tar cvf - ? | gzip -9> filename.tar.gz
>
>NOTE:
>The question mark (?) is really supposed to be there.


Why is the question mark there? This will only get files and
subdirectories with single-character names.

--
Barry Margolin, barry.margolin@level3.com
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-16-2008, 05:46 PM
Bill Marcum
 
Posts: n/a
Default Re: tar and gzip

On Thu, 10 Jul 2003 09:45:41 GMT, Doug Burton
<dburton30@hotmail.com> wrote:
> To copy files to a tarball and gzip at the same time.
> tar cvf - ? | gzip -9> filename.tar.gz
>
> NOTE:
> The question mark (?) is really supposed to be there.
>

Why?

--
Here I am, fifty-eight, and I still don't know what I want to be when
I grow up.
-- Peter Drucker
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:07 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com