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/
How do I create a tar file in Linux?
How to tar a file in Linux using command line
- Open the terminal app in Linux.
- Compress an entire directory by running tar -zcvf file.tar.gz /path/to/dir/ command in Linux.
- Compress a single file by running tar -zcvf file.tar.gz /path/to/filename command in Linux.
- Compress multiple directories file by running tar -zcvf file.tar.gz dir1 dir2 dir3 command in Linux.
https://commons.wikimedia.org/wiki/File:Captura_pantalla_manual_tar_linux.png