How To Open a Tar.gz File In Unix

Let us talk about scripts, HTML, Perl, PHP, apache, etc.
User avatar
Stevyn
SysOp
Posts:1773
Joined:Mon Nov 09, 2009 10:03 am
Location:Japan
Contact:
How To Open a Tar.gz File In Unix

Post by Stevyn » Sat Aug 10, 2013 7:26 am

Code: Select all

tar -zxvf data.tar.gz
-z : Uncompress the resulting archive with gzip command.
-x : Extract to disk from the archive.
-v : Produce verbose output i.e. show progress and file names while extracting files.
-f data.tar.gz : Read the archive from the specified file called data.tar.gz.


is the file just gzipped?

Code: Select all

gzip -d mydata.doc.gz

Need to create a tarball that is gz zip compressed?

Code: Select all

tar -zcvf archive_name.tar.gz directory_to_compress
tar it in tmp directory of files/folders in current folder:

Code: Select all

tar -zcvf /tmp/archive_name.tar.gz  .
Contact me directly: Ironfeatherbooks (@) gmail.com

Image

Post Reply