How to create an archive file(.tar) using tar command in Linux

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

To create an archive of a directory and its contents you would type the following and press enter:

tar -cvf name.tar /path/to/directory

To create an archive of certfain files you would type the following and press enter:

tar -cvf name.tar /path/to/file1 /path/to/file2 /path/to/file3

Leave a Reply

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