The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 03-08-2009
ezjay ezjay is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 2
copy and compress without itermediate files

To compress:

Code:
tar cf - <space_separated_list_of_files/folders> | gzip -c - > <path>/<archive_name>.tar.gz
To uncompress:

cd to the directory you want the files extracted in and run:

Code:
gunzip -c <path>/<archive_name>.tar.gz | tar xf -
(On Solaris, be sure to add the option E to the tar creation command arguments. i.e. tar cEf ...)