Most of us extract the compressed file in the same directory but what if you get into a situation you need to extract it at some other location?
You just need to add one extra argument
# tar -xzvf file.tar.gz -C /destination/path
# pwd /home # tar -czvf test.tar.gz test/
So, now our test directory is compressed. let us extract it inside /tmp staying under /home
[root@test home]# tar -xzvf test.tar.gz -C /tmp/ # cd /tmp # ls -l drwx------. 4 test test 4096 Sep 28 12:46 test
Easy and simple. Let me know your success and failures