Unzip with tar in different destination
while
tar -xzvfare the standard switches for unzipping a .tar.gz file where
1) -x is for extract, as expected
2) -z is for gzipped file, similar to its name
3) -v is for verbose, which is pretty constant across commands
4) -f is for specifying the file, which is pretty standard and expectedthe output is usually a directory of the tar file name in the current directory.
If however you want to unzip to a dest_folder use the -C switch, like so
tar -xzvf file.tar.gz -C my/pathSimple but very useful in day-to-day jobs
Written by Arindam Chakraborty
Related protips
2 Responses
 
Good to know
over 1 year ago
·
 
Why are you still using "z" parameter, while you can use tar xvf?
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
 #Linux 
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#

 
 
 
 
