Tutorial: Using tar command to Archiving/Unarchiving files
This tutorial shows you how to use tar utility to Archiving/Unarchiving your files on linux/unix machine. Introduction The basic command for archiving files with the tar command is: tar -cvf archive.tar file1 file2or tar -cvf archive.tar file1 file2 (for archiving everything in the directory) where: c - for creating a new file
Archiving Directory -C option is used to archive the directory using tar command. For example you want to archieve a called "mydir", so you will be using the following command: tar -cvf archive.tar -C mydir Unarchiving using tar command You can use tar utility to unarchieve your tar files. Suppose you have a tar file called "myfile.tar" and you want to unarchieve it. Then the following command you will be using to unarchieve the file: tar -xvf myfile.tar
|