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.
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/).
Step 3: You may see ‘New.tar’ archive file is created on the desktop.
Step 4: Now if you want to create some text file inside your archive then, you can use “tar -rf New.tar doc1.txt”.
Step 5: You’ll see your text file (doc1.txt) inside your archive (New.tar), as shown in the image below.
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”.
Step 7: You can see a new archive file having one text file in it.
Step 8: Now type “tar -Af New.tar New2.tar” which will merge any two archives.
Step 9: The ‘-Af’ command place all the files and folders inside New2.tar to New.tar as shown in the image below.
That’s all friends, Keep reading.
Leave a Reply