- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Pipe or redirect "tar" to "gzip"
Operating System - HP-UX
1820704
Members
2571
Online
109627
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-1999 04:27 AM
тАО11-19-1999 04:27 AM
Pipe or redirect "tar" to "gzip"
I've seen it done & and I have even done it myself in the past but I can't
figure it out again -
What is the correct syntax to pipe or redirect tar to gzip ? (What I'm trying
to do is compress the tar file as I add files to it)
Please e-mail me suggestions
figure it out again -
What is the correct syntax to pipe or redirect tar to gzip ? (What I'm trying
to do is compress the tar file as I add files to it)
Please e-mail me suggestions
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-1999 05:29 AM
тАО11-19-1999 05:29 AM
Re: Pipe or redirect "tar" to "gzip"
The following should work:
tar cvf - fileglob | gzip > myzippedfile.gz
Obviously, replace "fileglob" with whatever makes sense.
Be careful with block size with this command. I've seen tar do some odd things.
In fact, you should probably use this format, just to be safe:
tar cvbf 20 - fileglob | gzip > myzippedfile.gz
As a side note, there are versions of tar available that will both tar and
compress at the same time. I can't remember where to get that version, but it's
probably a gnu tool.
MrNeil
tar cvf - fileglob | gzip > myzippedfile.gz
Obviously, replace "fileglob" with whatever makes sense.
Be careful with block size with this command. I've seen tar do some odd things.
In fact, you should probably use this format, just to be safe:
tar cvbf 20 - fileglob | gzip > myzippedfile.gz
As a side note, there are versions of tar available that will both tar and
compress at the same time. I can't remember where to get that version, but it's
probably a gnu tool.
MrNeil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-1999 05:33 AM
тАО11-19-1999 05:33 AM
Re: Pipe or redirect "tar" to "gzip"
I forgot to mention... If you name your gzipped output file has a .tgz
extension, gunzip is smart enough to know that it's a gzipped tar file, and
will rename it with a .tar extension when gunzipped later.
MrNeil
extension, gunzip is smart enough to know that it's a gzipped tar file, and
will rename it with a .tar extension when gunzipped later.
MrNeil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-23-1999 06:54 PM
тАО11-23-1999 06:54 PM
Re: Pipe or redirect "tar" to "gzip"
See http://hpux.csc.liv.ac.uk/hppd/hpux/Gnu/tar-1.13.14/ there ara a new tar
command that compress and uncompress directly with the "-z" option.
Frank.
command that compress and uncompress directly with the "-z" option.
Frank.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP