cli-tarHow do I unzip a tar.gz file in Unix?
To unzip a tar.gz file in Unix, use the following command:
tar -xzf <file_name>.tar.gz
This command will extract the contents of the tar.gz file into the current directory.
The command parts are:
tar: The tar command is used to create, modify, and extract tar archives.-xzf: This option tells tar to extract the contents of the tar.gz file.-x: Extract files from an archive.-z: Filter the archive through gzip.-f: Use the following tar archive for the operation.
<file_name>.tar.gz: The name of the tar.gz file to be extracted.
For more information, please refer to the following links:
More of Cli Tar
- How do I use the Unix tar zip command?
- How do I use the Unix tar xzvf command?
- How do I use the Unix tar xvf command to extract files?
- How do I use gzip with tar?
- How do I use gzip to compress a tar file on Windows?
- How can I use the CLI to yield a tar file?
- How can I use gzip to compress a file without using tar?
- How can I decide between using tar gzip and bzip2 for compressing files?
- How do I use the shell to tar and zip files?
- How do I use tar commands with xz?
See more codes...