Unix/Linux : How to open tar.gz file ?
It has been a while since I touched tar files( have been using Mac for long time) and couple of days back I need to open up a tar and gzipped file.
Need to do a tar -h
to see how to open up the tar.gz archive
Without much ado, the command to open a tar.gz file looks like this :
tar -zxvf nicephotos.tar.gz -C /nicephotos
Basically the command above is to :
-z Uncompress archive with gzip format
-x Extract the files in the archive
-v Verbose mode ( more information)
-f
Location of archive -C
<target dir>
Change to<target dir>
before processing remaining files (output files to the target directory)
Just in case you want to view the archive content before uncompressing. You can use this command
tar -tzvf nicephotos.tar.gz
- -t will list only entries that match( display everything)
Hope this short tutorial is useful for you.
See also : Unix/Linux : How to archive and compress entire directory ?
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+2.2k Fix Google Analytics Redundant Hostnames problem
+1.5k Golang : How to setup a disk space used monitoring service with Telegram bot
+2.1k PHP : Proper way to get UTF-8 character or string length
+5.5k Golang : Query string with space symbol %20 in between
+10.1k Golang : Calculate percentage change of two values
+5.7k Golang : Generate Code128 barcode
+2.8k Golang : Function as an argument type example
+4.8k Golang : Read until certain character to break for loop
+13.1k Golang : Sort and reverse sort a slice of strings
+2k Linux/MacOSX : Search and delete files by extension
+3.1k Golang : Extract sub-strings
+3.3k Golang : Scanf function weird error in Windows