unzip tar.gz file mac terminal code example Example 1: unzip tar.gz tar -xvf file.tar.gz Example 2: extract tar.gz mac command line tar -xzvf myfile.tar.gz