how to create tar file in ubuntu

Ads
 

how to create tar file in ubuntu

Hi,

I have a directory with many sub directories and files in it. I want to create tar file of the directory so that it can be moved to another computer easily.

I am searching for command to do this. What is easy command for this which i can run in terminal.

how to create tar file in ubuntu?

Thanks

View Answers

October 10, 2018 at 12:33 AM

Hi,

Here is command to create tar file which includes the content of directory and sub directory:

tar -zcvf dir_archieve.tar.gz dir_name

Following command is used to uncompress the content of the tar.gz file:

tar -zxvf dir_archieve.tar.gz

Above command will extract the content of the tar.gz file.

If you want to preserve the permission of the folder while creating tar.gz file use following command:

tar -pcvzf  dir_archieve.tar.gz dir_name

The -pcvzf is used for this.

To extract it with the permission intact use following command:

tar -pxvzf dir_archieve.tar.gz

This the way of working with the archiving and unarchiving in linux system using terminal.

Thanks

Ads









Related Tutorials/Questions & Answers:
how to create ipa file
how to create ipa file  Hi, How to .ipa file? Thanks   Hi, Please check the thread Resources have been modified iPhone. Thanks
How to download and install Ubuntu 16.04?
How to download and install Ubuntu 16.04?  Hi, Recently Ubuntu 16.04... to download and install it computer. Tell me How to download and install Ubuntu 16.04... the Ubuntu from its official website. Copy the downloaded image file ubuntu-16.04
Advertisements
How to create a jar file
How to create a jar file  Hello!!!! I have a project which has... a single executable jar of it... so pls tell me how it will b possible for me???   The given code creates a jar file using java. import java.io.*; import
How to install Ubuntu 16.04 LTS?
How to install Ubuntu 16.04 LTS?  Hi, Latest version of Ubuntu 16.04... Virtual Box. Thanks   How to install Ubuntu 16.04 LTS... Virtual Box Create new Virtual Machine Add Ubuntu 16.04 LTS ISO and start
tar directory and subdirectories
on Linux machine. I have to create the .tar file of a directory and subdirectories. How I can tar directory and subdirectories? Thanks   Hi, It's very easy in Linux or Unix. You can easily create tar archive of directory
How to upgrade Ubuntu to Ubuntu 16.04 LTS?
How to upgrade Ubuntu to Ubuntu 16.04 LTS?  Hi, I have old system running the Ubunut 14.04 and now I want to upgrade it to latest version of Ubuntu 16.04 LTS. How to do upgrade? Thanks   Hi, Here is video
How to install Neo4j on Ubuntu 15.10?
How to install Neo4j on Ubuntu 15.10?  How to install the latest version of Neo4j on Ubuntu? Thanks
How to upgrade Ubuntu 16.04 LTS?
How to upgrade Ubuntu 16.04 LTS?  Hi, I want to learn the process of upgrading the Ubuntu 16.04. Provide me more details. Thanks
How to create XML file - XML
How to create XML file  Creating a XML file, need an example. Thanks!!  To create XML file you need plain text editor like note pad. After... language has many API's to create xml file from program.Here is the code example
how to create an excel file using java
how to create an excel file using java  how to create an excel file using java
How To Create a New File
How To Create a New File In this section we will discuss about how to create... which will demonstrate you about how to create a new file in Java... store String, characters, numbers etc. In Java to create a File for storing
how to find jdk path in ubuntu?
how to find jdk path in ubuntu?  How to find out the path of installed jdk in ubuntu? Could anyone tell that command to execute from terminal.. Thanks
How to see ubuntu version on server?
How to see ubuntu version on server?  Hi, Its easy to see the version of Ubuntu on the Ubuntu Desktop operating system. But I have a server on which I have ssh access. How to see ubuntu version on that server? Thanks  
how to create pdf file using java and itextjar
how to create pdf file using java and itextjar  How to create pdf file having paragraphs and alignments done using java and itextjar 5.10 version.? hope i get quick response
how to create pdf file using java and itextjar
how to create pdf file using java and itextjar  How to create pdf file having paragraphs and alignments done using java and itextjar 5.10 version.? hope i get quick response
how to create a php script to download file
how to create a php script to download file  php script to download file
how to run jdbc program in linux-ubuntu?
how to run jdbc program in linux-ubuntu?   how to run jdbc program in linux-ubuntu
How to create a .mdf file from script (.sql)
How to create a .mdf file from script (.sql)  Hi, I have a sql database in 2008 server. now i want it to convert to 2005. so i script it. just help me to create a .mdf file back from the script
How to install ffmpeg on Ubuntu 16.04?
How to install ffmpeg on Ubuntu 16.04?  Hi, My new Ubuntu 16.04 LTS... computer. I forgot the command to install ffmpeg . How in can install ffmpeg on Ubuntu 16.04? Thanks   Hi, How to install ffmpeg on Ubuntu 16.04? Use
How to check Hadoop version in Ubuntu?
How to check Hadoop version in Ubuntu?  Hi, I am trying various... to Hadoop cluster through ssh terminal. How to check Hadoop version in Ubuntu? Thanks   Hi, Its easy to check the version of Hadoop in Ubuntu. type
how can create a jar file - Java Beginners
how can create a jar file  plz any one help me which file can i create the jar file plz give exact command  Hi The basic format... that you want to create a JAR file. * The f option indicates that you want
how to create an xml file in following clear format
how to create an xml file in following clear format  anyone please help me out to create this file,,. <Tasks> <Taskid>1 <Taskname>Coding <Project>CeMIC <Date>
How to install pip on Ubuntu 16.04?
How to install pip on Ubuntu 16.04?  Hi, How to install pip on Ubuntu 16.04? I am running the command apt-get install pip, but its not working.../ubuntu xenial-security InRelease [94.5 kB] Hit:2 http://in.archive.ubuntu.com
How to create a jar file with database connection
How to create a jar file with database connection  Hello Everyone... access & i want to create a jar file of it... I have tried with manifest file but its not working pls help me.....   The given code creates a jar
How to install p7zip on Ubuntu 16.04?
How to install p7zip on Ubuntu 16.04?  Hi, What is the correct command to install p7zip on Ubuntu? How to install p7zip on Ubuntu 16.04? Thanks   Hi, To install p7zip on Ubuntu 16.04 following the following steps
How to install MySQL Server and Client on Ubuntu 16.04?
How to install MySQL Server and Client on Ubuntu 16.04?  Hi, Latest version of Ubuntu 16.04 is already released and it can be downloaded from Ubuntu... http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 file-roller amd64
How to create file from input values in Jframe ?
How to create file from input values in Jframe ?  hi i m doing my project using java desktop application in netbeans.i designed a form to get... to take these details and make a file that can be appended each time.how
How to create pdf file in struts2.
How to create pdf file in struts2. In this example, you will see the how to create PDF in struts, and how to write message in generated PDF file in struts2.  For this, we requires a jar file iText.jar. It is used in java
How to create one xml file from existing xml file's body?
How to create one xml file from existing xml file's body?  Hi, i'm working with content optimization system.I want to know how we can take all data from an xml doc's body to develope another xml with that content.I'm using JDOm
How to install virtualbox guest additions in Ubuntu 16.04?
How to install virtualbox guest additions in Ubuntu 16.04?  Hi, How to install virtualbox guest additions in Ubuntu 16.04? The problem is I am.... Thanks   Hello, After installing the virtualbox guest additions in Ubuntu
How to install LAMP server on Ubuntu 16.04 LTS?
How to install LAMP server on Ubuntu 16.04 LTS?  I have given the task to install LAMP sever on Ubuntu 16.04 LTS. How to install LAMP server on Ubuntu 16.04 LTS? Thanks   Hi, For install LAMP on Ubuntu 16.04 LTS apt

Ads