linux uncompress tar.gz into folder code example
Example 1: extract from tar gz into folder
mkdir foo
tar -xzf bar.tar.gz -C foo
Example 2: extract tar to destination
tar xf file.tar.gz -C /root/Desktop/folder
mkdir foo
tar -xzf bar.tar.gz -C foo
tar xf file.tar.gz -C /root/Desktop/folder