QueHow

A How-To and wiki Blog

  • Operating System
    • Windows
      • Windows 10
      • Windows 7
    • Linux
  • Software
    • Application Software
    • Microsoft Office
      • Outlook
      • Word
      • PowerPoint
  • Internet
    • Browsers
      • Mozilla Firefox
      • Google Chrome
    • CMS
    • Tips & Tricks
  • Website
    • ecommerce
    • Google
    • Social Networking
    • General Websites
  • Mobile
  • Email
    • Gmail
  • Wiki

How to use ‘tar’ command to create archives in Ubuntu 14.04

By Neha T Leave a Comment

One will always prefer to compress the folder when they want to send more than one file through the mail. Zipping the file will decrease its size, which helps to upload your documents easily and effectively. You can easily use Winrar in Windows to zip/unzip your folder but what about Ubuntu??. Don’t worry friends, in Linux system, you can also zip/unzip your file folders easily with the help of the tar command.

The tar command is one of the most used archive utility function for Linux operating system. Though there is GUI Archive software like File roller, but if you prefer to use terminal then tar command is going to be most effective for you. Just have a glance at this article to know how to use tar command to create archives in Ubuntu 14.04.

Steps to use tar command to create archives:

Step 1: First open your terminal by using “Ctrl+ALT+T” and type  “cd/home/username/Desktop/” and then press enter.

how-to-use-tar-command-to-create-archives-in-ubuntu-14-04

Step 2: Now, for the explanation we are creating one folder named “New” in the desktop and in order to create tar file of that folder, just type: “tar  -cf Your_folder_name.tar  Your_folder_name/” .(for eg. tar  -cf New.tar New/).

how-to-use-tar-command-to-create-archives-in-ubuntu-14-04

Step 3: You may see ‘New.tar’ archive file is created on the desktop.

how-to-use-tar-command-to-create-archives-in-ubuntu-14-04

Step 4: Now if you want to create some text file inside your archive then, you can use “tar -rf  New.tar doc1.txt”.

how-to-use-tar-command-to-create-archives-in-ubuntu-14-04

Step 5: You’ll see your text file (doc1.txt) inside your archive (New.tar), as shown in the image below.

how-to-use-tar-command-to-create-archives-in-ubuntu-14-04

Step 6: You can easily merge two archives, but for this, we have to create a new archive for that type “tar -cf New2.tar doc2.txt”.

how-to-use-tar-command-to-create-archives-in-ubuntu-14-04

Step 7: You can see a new archive file having one text file in it.

how-to-use-tar-command-to-create-archives-in-ubuntu-14-04

Step 8: Now type “tar -Af New.tar New2.tar” which will merge any two archives.

how-to-use-tar-command-to-create-archives-in-ubuntu-14-04

Step 9: The ‘-Af’ command place all the files and folders inside New2.tar to New.tar as shown in the image below.

how-to-use-tar-command-to-create-archives-in-ubuntu-14-04

That’s all friends, Keep reading.

You Might Also Like:

How to Create a Text File using Command Line in Ubuntu 14.04 ( 2 Methods) How to create a zip file using terminal in Ubuntu 14.04 how-to-use-sed-command-in-ubuntuHow to Use SED Command in Ubuntu How to Create Desktop icons in Ubuntu 14.04 how-to-hide-and-show-files-and-folders-in-ubuntuHow to Hide & Show Files and Folders in Ubuntu How to convert pdf file to text file in Ubuntu 14.04 How to batch convert text documents in Ubuntu 14.04 How to create a password protected folder in Ubuntu 14.04

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Most Viewed

  • How to Install and Use TELNET in Ubuntu
  • How to install Hindi fonts in MS Word
  • How to Change a File Extension in Windows 10?
  • How to create a flipkart account in 3 simple steps
  • How to Change Monitor Refresh Rate in Windows 10?
  • How to install IIS on Windows 10
  • How to Insert Clickable Checkbox in MS Word 2016?
  • How to Set Auto Reply in Outlook 2016?
  • How to Login as Administrator in Windows 10?
  • How to Check RAM Size and System Type in Windows 10?

Recent Additions

  • How to Add Hyperlink to Another Sheet in Excel?
  • How to Add and Remove Watermark in Excel
  • How to use Relative and Absolute Cell Reference in Excel?
  • How to Enable and Disable Scroll Lock in Excel?
  • How to Use INDEX and MATCH Functions in Excel?
  • How to Make Bar Graph in Excel?
  • How to Count Duplicate Values in Excel?
  • How to Wrap Text in Excel?
  • How to Round off Numbers in Excel?
  • How to Create a Bell Curve in Excel?

Related Searches

  • How to Change Folder Icons in Windows 7
  • How to Add or Remove programs in Ubuntu 14.04
  • How to prevent others from accessing your home directory in Ubuntu 14.04
  • How to Set Slide Timing in MS PowerPoint 2016?
  • How to Disable Startup Programs in Windows 10?

Copyright © 2023 · QueHow · Contact Us