To create a tar execute command in following format.
$ tar -cvf <file_name>.tar file1 file2 .....filen
We can add any type of file and any number of files including folder/directory to tar using this command.
Example: To add file1.txt and file2.txt to sample.tar execute following command.
$ tar -cvf sample.tar file1.txt file.txt folder
No comments:
Post a Comment