---

How To Extract a Tar Files To a Different Directory on a Linux/Unix-like Systems

I want to extract tar file to specific directory called /tmp/data. How can I extract a tar archive to a different directory using tar command on a Linux or Unix-like systems? You do not need to change the directory using cd command and extract files. Untarring a file can be done using the following syntax: