This is a discussion on packing and compressing in one command call within the Sun Solaris Administration forums, part of the Solaris Operating System category; --> i need help on creating a tar files including compressing in one command call....
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| "Toni Pekas" <toni.pekas@swisscom.com> writes: >i need help on creating a tar files including compressing in one command >call. > > Why? (Some tar's will create gzip output in one step. I can never remember which ones, so I always pipe things in and out of compress/gzip.) -- "The road to Paradise is through Intercourse." [email me at huge [at] huge [dot] org [dot] uk] |
| |||
| In article <1077101066.641295@ftpgate>, "Toni Pekas" <toni.pekas@swisscom.com> wrote: > i need help on creating a tar files including compressing in one command > call. If your tar includes the -z option, use it. Otherwise: tar cf - <filenames> | gzip > archive.tar.gz -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** |
| |||
| "Barry Margolin" <barmar@alum.mit.edu> wrote in message news:barmar-> > tar cf - <filenames> | gzip > archive.tar.gz tar cf - <filenames> | gzip - >`archive.tar.gz haven't checked, but the above will work without specifying standard in as '-'? Ron |
| |||
| "Toni Pekas" <toni.pekas@swisscom.com> wrote in message news:<1077101066.641295@ftpgate>... > i need help on creating a tar files including compressing in one command > call. tar cvf - /some/dir | gzip > mytar.tar.gz or if zip format is acceptable zip -r9 myzip /some/dir |
| ||||
| "Ron" <fbr@m-net.arbornet.org> writes: > "Barry Margolin" <barmar@alum.mit.edu> wrote in message news:barmar-> > > > tar cf - <filenames> | gzip > archive.tar.gz > tar cf - <filenames> | gzip - >`archive.tar.gz > > haven't checked, but the above will work without specifying standard in as > '-'? Yes. gzip (like most UNIX utilities) assumes stdin if you don't give it a file. -- James Carlson, IP Systems Group <james.d.carlson@sun.com> Sun Microsystems / 1 Network Drive 71.234W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.497N Fax +1 781 442 1677 |