How to download tar file in centos






















It is the most widely used command line utility to create compressed archive files packages, source code, databases and so much more that can be transferred easily from machine to another or over a network. In this article, we will show you how to download tar archives using two well known command line downloaders — wget or cURL and extract them with one single command. The example below shows how to download, unpack the latest GeoLite2 Country databases use by the GeoIP Nginx module in the current directory.

The wget option -O specifies a file to which the documents is written, and here we use - , meaning it will written to standard output and piped to tar and the tar flag -x enables extraction of archive files and -z decompresses, compressed archive files created by gzip.

Note : If extracting files to particular directory that requires root permissions, use the sudo command to run tar. Alternatively, you can use the following command, here, the archive file will be downloaded on your system before you can extract it. Considering the previous example, this is how you can use cURL to download and unpack archives in the current working directory. In this short but useful guide, we showed you how to download and extract archive files in one single command.

If you have any queries, use the comment section below to reach us. TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! If you like what you are reading, please consider buying us a coffee or 2 as a token of appreciation. We are thankful for your never ending support.

Once you have tar installed on your system, you can use it as follows. In the above command, the tar flags used are -c which creates a new. To compress the resulting archive file using gzip or bzip2 , supply the -z or -j flag as follows.

Note that a compressed tarball can also end with the. To list the contents of a tarball archived file , use the -t flag as follows. If you have any queries, share it with us via the feedback form below. TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web.

Millions of people visit TecMint! If you like what you are reading, please consider buying us a coffee or 2 as a token of appreciation. We are thankful for your never ending support. You have discussed about usage of tar rather than installing of tar program itself. Am I not right? If not, removing all the files that where installed can be a massive pain in the neck.

If the code is good however, you should be able to navigate to the installation folder as in Step 4 and type:. And this should remove the package from your system. Our admins will Install tar. If you liked this post about How to Install tar. Save my name, email, and website in this browser for the next time I comment. Yes, add me to your new blog post notifications list.



0コメント

  • 1000 / 1000