Insights

How to create tar archive file in linux

The below command will create a tar archive file whatevername_yougive.tar for a directory /path/of/directory/to/archive in current working directory.

See the example below.

tar cvf whatevername_yougive.tar /path/of/directory/to/archive

The options detail are explained as below
c – Creates a new .tar archive file.
v – Verbosely show the .tar file progress.
f – File name type of the archive file.

Similarly to create tar.gz file

tar cvzf whatevername_yougive.tar.gz /path/of/directory/to/archive

To untar or uncompress a tar file check here

Turn insight into action

Need help with linux or a related project?

If this article sparked an idea, question, or project direction, I can help you turn it into a practical next step.

Start a conversationChat on WhatsApp

Related reading

Articles connected to this topic

apache

Copy file from one server to another using scp on linux

If you have to copy any files from one server to another, you normally copy the same using FTP or wget. But some time wget function is disabled on server due to security reason. Hence there is one more additional option that you can use to copy your file from another server to your server. […]

Apr 26, 2024

Read article

Most recent

Latest posts from the blog

View all articles →