tar command

tar command

Hi,

What is tar command in Linux and how it is used?

Thanks

View Answers

April 22, 2020 at 2:41 PM

Hi,

The tar is very popular utility in Linux/UNIX which was first introduced to Linux back in January 1979 for taking the tape backup of the data/software.

Since then it became of the most popular tool in Linux for archiving files and directories. The tar tool is very powerful and comes with many options to work with the archiving and un-archiving of the files/directories.

The tar tool can be used from the command line, so you can even login to your Linux/UNIX system from an ssh terminal and use this powerful tool on your server.

If you have a directory named "mydata" and you want to archive this directory into a tar.gz file you can do it by following tar command:

tar cvzf mydata.tar.gz mydata

The above command will create an archive file called mydata.tar.gz which will have all the data stored in the mydata directory. It will include all the files, directories and files under all sub directories into the tar.gz file. The tar command preserves the directory structure in the tar.gz file and you will get same directory structure as original when extracted.

So, this tool is very powerful for the Linux user and administrators.

Check the following tutorial for detailed instruction on the use of tar utility in Linux:

Thanks









Related Tutorials/Questions & Answers:
tar command
tar command  Hi, What is tar command in Linux and how it is used? Thanks
tar directory and subdirectories
and subdirectories. Use the following command: tar -cvf myArchieve.tar myfolder/ Thanks...tar directory and subdirectories  Hi, I am developing program on Linux machine. I have to create the .tar file of a directory and subdirectories
Advertisements
ModuleNotFoundError: No module named 'tar-diff'
command: pip install tar-diff After the installation of tar-diff python...ModuleNotFoundError: No module named 'tar-diff'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'tar
ModuleNotFoundError: No module named 'tar-progress'
with following command: pip install tar-progress After the installation...ModuleNotFoundError: No module named 'tar-progress'  Hi, My Python... 'tar-progress' How to remove the ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'tar-diff'
command: pip install tar-diff After the installation of tar-diff python...ModuleNotFoundError: No module named 'tar-diff'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'tar
ModuleNotFoundError: No module named 'batch-tar'
command: pip install batch-tar After the installation of batch-tar...ModuleNotFoundError: No module named 'batch-tar'  Hi, My Python... 'batch-tar' How to remove the ModuleNotFoundError: No module named 'batch
linux tar folder and subfolders
. Help me with the command in Linux for archiving folder and subfolders into tar...linux tar folder and subfolders  Hi, I am new to Linux operating... for me for zipping it into a file possible Linux tar file. I just searched and found
how to check the size of a tar file in linux
how to check the size of a tar file in linux  Hi, I want to check the size of tar file in Linux. How to check the size of a tar file in linux? What Linux command I should use to check the size of a tar file? Thanks
how to create tar file in ubuntu
tar file in ubuntu? Thanks   Hi, Here is command to create tar file... of the tar.gz file: tar -zxvf dir_archieve.tar.gz Above command will extract... while creating tar.gz file use following command: tar -pcvzf dir
how to create tar file in ubuntu
tar file in ubuntu? Thanks   Hi, Here is command to create tar file... of the tar.gz file: tar -zxvf dir_archieve.tar.gz Above command will extract... while creating tar.gz file use following command: tar -pcvzf dir
ModuleNotFoundError: No module named 'devstack-plugin-tar-installer'
command: pip install devstack-plugin-tar-installer After...ModuleNotFoundError: No module named 'devstack-plugin-tar-installer'  ...: No module named 'devstack-plugin-tar-installer' How to remove
How do I compress a tar file in Linux
and many files are there inside it. I want to know the tar command... the command for this. Thanks   Hi, The tar command was first introduced... to work with files and directories. The tar command can be used to work
How do I compress a tar file in Linux
and many files are there inside it. I want to know the tar command... the command for this. Thanks   Hi, The tar command was first introduced... to work with files and directories. The tar command can be used to work
How do I compress a tar file in Linux
and many files are there inside it. I want to know the tar command... the command for this. Thanks   Hi, The tar command was first introduced... to work with files and directories. The tar command can be used to work
org.apache.jackrabbit - oak-segment-tar version 1.8.10 Maven dependency. How to use oak-segment-tar version 1.8.10 in pom.xml?
org.apache.jackrabbit  - Version 1.8.10 of oak-segment-tar Maven...-segment-tar in pom.xml? How to use oak-segment-tar version 1.8.10 in pom.xml? Learn... org.apache.jackrabbit  - Version 1.8.10 of oak-segment-tar in project by the help
org.apache.jackrabbit - oak-segment-tar version 1.6.11 Maven dependency. How to use oak-segment-tar version 1.6.11 in pom.xml?
org.apache.jackrabbit  - Version 1.6.11 of oak-segment-tar Maven...-segment-tar in pom.xml? How to use oak-segment-tar version 1.6.11 in pom.xml? Learn... org.apache.jackrabbit  - Version 1.6.11 of oak-segment-tar in project by the help
org.apache.jackrabbit - oak-segment-tar version 1.9.11 Maven dependency. How to use oak-segment-tar version 1.9.11 in pom.xml?
org.apache.jackrabbit  - Version 1.9.11 of oak-segment-tar Maven...-segment-tar in pom.xml? How to use oak-segment-tar version 1.9.11 in pom.xml? Learn... org.apache.jackrabbit  - Version 1.9.11 of oak-segment-tar in project by the help
org.apache.jackrabbit - oak-segment-tar version 1.8.9 Maven dependency. How to use oak-segment-tar version 1.8.9 in pom.xml?
org.apache.jackrabbit  - Version 1.8.9 of oak-segment-tar Maven...-tar in pom.xml? How to use oak-segment-tar version 1.8.9 in pom.xml? Learn... org.apache.jackrabbit  - Version 1.8.9 of oak-segment-tar in project by the help of adding
org.apache.jackrabbit - oak-segment-tar version 1.9.7 Maven dependency. How to use oak-segment-tar version 1.9.7 in pom.xml?
org.apache.jackrabbit  - Version 1.9.7 of oak-segment-tar Maven...-tar in pom.xml? How to use oak-segment-tar version 1.9.7 in pom.xml? Learn... org.apache.jackrabbit  - Version 1.9.7 of oak-segment-tar in project by the help of adding
How do I tar a directory without retaining the directory structure?
How do I tar a directory without retaining the directory structure?  Hi, I want to create tar file without retaining the directory permission. How to do this? Thanks   Use tar czf ~/backup.tgz Thanks
How do I tar a directory without retaining the directory structure?
How do I tar a directory without retaining the directory structure?  Hi, I want to create tar file without retaining the directory permission. How to do this? Thanks   Use tar czf ~/backup.tgz Thanks
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.46.0 is released. Learn to use oak-segment-tar version 1.46.0 in Maven based Java projects
-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 16 Dec 2022, the released version of  org.apache.jackrabbit - oak-segment-tar
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.22.13 is released. Learn to use oak-segment-tar version 1.22.13 in Maven based Java projects
of oak-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 13 Oct 2022, the released version of  org.apache.jackrabbit - oak-segment-tar
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.44.0 is released. Learn to use oak-segment-tar version 1.44.0 in Maven based Java projects
-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 12 Jul 2022, the released version of  org.apache.jackrabbit - oak-segment-tar
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.22.12 is released. Learn to use oak-segment-tar version 1.22.12 in Maven based Java projects
of oak-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 15 Jul 2022, the released version of  org.apache.jackrabbit - oak-segment-tar
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.42.0 is released. Learn to use oak-segment-tar version 1.42.0 in Maven based Java projects
-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 07 Jan 2022, the released version of  org.apache.jackrabbit - oak-segment-tar
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.22.11 is released. Learn to use oak-segment-tar version 1.22.11 in Maven based Java projects
of oak-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 22 Feb 2022, the released version of  org.apache.jackrabbit - oak-segment-tar
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.22.10 is released. Learn to use oak-segment-tar version 1.22.10 in Maven based Java projects
of oak-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 20 Jan 2022, the released version of  org.apache.jackrabbit - oak-segment-tar
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.8.26 is released. Learn to use oak-segment-tar version 1.8.26 in Maven based Java projects
-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 01 Feb 2022, the released version of  org.apache.jackrabbit - oak-segment-tar
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.6.23 is released. Learn to use oak-segment-tar version 1.6.23 in Maven based Java projects
-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 11 Mar 2022, the released version of  org.apache.jackrabbit - oak-segment-tar
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.40.0 is released. Learn to use oak-segment-tar version 1.40.0 in Maven based Java projects
-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 28 May 2021, the released version of  org.apache.jackrabbit - oak-segment-tar
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.38.0 is released. Learn to use oak-segment-tar version 1.38.0 in Maven based Java projects
-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 22 Jan 2021, the released version of  org.apache.jackrabbit - oak-segment-tar
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.22.9 is released. Learn to use oak-segment-tar version 1.22.9 in Maven based Java projects
-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 06 Oct 2021, the released version of  org.apache.jackrabbit - oak-segment-tar
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.22.8 is released. Learn to use oak-segment-tar version 1.22.8 in Maven based Java projects
-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 14 Jul 2021, the released version of  org.apache.jackrabbit - oak-segment-tar
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.22.7 is released. Learn to use oak-segment-tar version 1.22.7 in Maven based Java projects
-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 09 Apr 2021, the released version of  org.apache.jackrabbit - oak-segment-tar
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.22.6 is released. Learn to use oak-segment-tar version 1.22.6 in Maven based Java projects
-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 15 Jan 2021, the released version of  org.apache.jackrabbit - oak-segment-tar
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.8.25 is released. Learn to use oak-segment-tar version 1.8.25 in Maven based Java projects
-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 01 Nov 2021, the released version of  org.apache.jackrabbit - oak-segment-tar
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.6.22 is released. Learn to use oak-segment-tar version 1.6.22 in Maven based Java projects
-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 15 Nov 2021, the released version of  org.apache.jackrabbit - oak-segment-tar
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.6.21 is released. Learn to use oak-segment-tar version 1.6.21 in Maven based Java projects
-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 28 May 2021, the released version of  org.apache.jackrabbit - oak-segment-tar
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.6.20 is released. Learn to use oak-segment-tar version 1.6.20 in Maven based Java projects
of oak-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 31...-tar library is 1.6.20. Developer can use this version ( org.apache.jackrabbit
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.8.13 is released. Learn to use oak-segment-tar version 1.8.13 in Maven based Java projects
of oak-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 09...-tar library is 1.8.13. Developer can use this version ( org.apache.jackrabbit
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.8.20 is released. Learn to use oak-segment-tar version 1.8.20 in Maven based Java projects
of oak-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 29...-tar library is 1.8.20. Developer can use this version ( org.apache.jackrabbit
Maven dependency for org.apache.jackrabbit - oak-segment-tar version 1.6.17 is released. Learn to use oak-segment-tar version 1.6.17 in Maven based Java projects
of oak-segment-tar released The developers of   org.apache.jackrabbit - oak-segment-tar project have released the latest version of this library on 08...-tar library is 1.6.17. Developer can use this version ( org.apache.jackrabbit
Maven Repository/Dependency: org.apache.jackrabbit | oak-segment-tar
Maven Repository/Dependency of Group ID org.apache.jackrabbit and Artifact ID oak-segment-tar. Latest version of org.apache.jackrabbit:oak-segment-tar dependencies. # Version Release Date
Compute command
Compute command  hello, What is compute command?   hii, samarADS_TO_REPLACE_1 Compute command control computations on subsets created by the BREAK command
Print command
Print command  Can I use System.out.println command in Struts form bean or Struts action class. I am using Struts 1.3.8 but when I write this command...;You can use System.out.println command in Strut Action Class. The message written
Create tar.gz file in Linux command line
directory name or file name for adding into the tar.gz file. Linux tar command... backup. This command is used by the administrator of Linux/Unix system. The tar... in command line mode in Linux terminal. Open the terminal in Linux and type 'tar
iperf command in java
iperf command in java  How to write a code for iperf command in java
c++ system command
c++ system command   c++ system command variables and an example in real time of using the system command
Command line arguments
Command line arguments  Please explain me what is the use of "command line arguments" and why we need to use

Ads