Logo 
Search:

Unix / Linux / Ubuntu Articles

Submit Article
Home » Articles » Unix / Linux / Ubuntu » CommandsRSS Feeds

Tar is used to archive file - tar

Posted By: Shruti Sharma     Category: Unix / Linux / Ubuntu     Views: 3512

This article explains about tar command with an example in unix.

tar command is used to archive file in unix.

Syntax of tar Command

tar r [ bBeEfFhiklnqvw [ 0-7 ] ] [ block ] {-I include-file | -C directory | file | file } 

Example of tar Command

Example 1 : To archive file1, file2 and file3 into file.tar

tar -cvf file.tar file1 file2 file3

Example 2 : To display the contents of a archived file.tar

tar -cvf file.tar file1 file2 file3

Example 3 : To display the contents of a archived file.tar

tar -cvf file.tar

Example 4 : To unachieved a archived file.tar

tar -xvf file.tar

  
Share: 


Didn't find what you were looking for? Find more on Tar is used to archive file - tar Or get search suggestion and latest updates.

Shruti Sharma
Shruti Sharma author of Tar is used to archive file - tar is from United States. Shruti Sharma says Hello Everyone,
I am Shruti Sharma from United States
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!