Question: How to Untar Tar File in Linux?
Contents How to Open or Untar a “Tar” File in Linux or Unix: from the Terminal, Change to the Directory Where Yourfile. Tar Has Been Downloaded. Type Tar -Xvf...
Contents
How to open or Untar a “tar” file in Linux or Unix:
- From the terminal, change to the directory where yourfile.tar has been downloaded.
- Type tar -xvf yourfile.tar to extract the file to the current directory.
- Or tar -C /myfolder -xvf yourfile.tar to extract to another directory.
How do I open a tar file in Terminal?
Steps
- Open the terminal.
- Type tar .
- Type a space.
- Type -x .
- If the tar file is also compressed with gzip (.tar.gz or .tgz extension), type z .
- Type f .
- Type a space.
- Type the name of the file that you wish to extract.
How do I open a tar XZ file in Linux?
Extracting or Uncompressing tar.xz Files in Linux
- On Debian or Ubuntu, first install the package xz-utils. $ sudo apt-get install xz-utils.
- Extract a .tar.xz the same way you would extract any tar.__ file. $ tar -xf file.tar.xz. Done.
- To create a .tar.xz archive, use tack c. $ tar -cJf linux-3.12.6.tar.xz linux-3.12.6/