How to use a tar command to unzip a file on Linux/Unix-like terminal

Fig.01: How to use a tar command to unzip a file on Linux/Unix-like terminal

Fig.01: How to use a tar command to unzip a file on Linux/Unix-like terminal

You can use a tar command to unzip a file on Linux/Unix-like terminal:
$ tar xvf foo.zip
Sample outputs:

x etc/asl.conf
x etc/autofs.conf
x etc/dnsextd.conf
x etc/ftpd.conf
x etc/kern_loader.conf
x etc/man.conf
x etc/newsyslog.conf
x etc/nfs.conf
x etc/notify.conf
x etc/ntp-restrict.conf
x etc/ntp.conf
x etc/ntp_opendirectory.conf
x etc/pf.conf
x etc/resolv.conf
x etc/rtadvd.conf
x etc/syslog.conf

To extract file to a particular folder say /tmp/myzipfiles/, run:
$ tar xvf myfile.zip -C /tmp/myzipfiles/
Sample outputs:

x etc/asl.conf
x etc/autofs.conf
x etc/dnsextd.conf
x etc/ftpd.conf
x etc/kern_loader.conf
x etc/man.conf
x etc/newsyslog.conf
x etc/nfs.conf
x etc/notify.conf
x etc/ntp-restrict.conf
x etc/ntp.conf
x etc/ntp_opendirectory.conf
x etc/pf.conf
x etc/resolv.conf
x etc/rtadvd.conf
x etc/syslog.conf

Examples and usage: How to unzip a zip file using the Linux and Unix bash shell terminal