TAR and Curl in Windows: Learn more about TAR archiving on Windows 10 and 11. Use TAR and ZIP files to back up your data.
TAR is still the most popular tool for archiving data on Linux, but now it is available on Windows. The TAR (Tape ARchiver), which is still very popular and widespread today, as a very common command for Linux users to back up data and directories, it compresses on request also with the help of gzip or bzip2. The name was originally formed from tape archiver, as used to back up data to tape drives.
How to use C:\> tar -xf on Windows
Use TAR and Curl in Windows
Linux users will be happy about the possibility of being able to use TAR under Windows, because Microsoft also provides the command for Windows 10, where TAR is onboard from build 17063.
TAR also extracts ZIP files
Interesting and unexpected is also that tar of Windows 10 also extracts ZIP files. Which formats for compression will continue to be supported is not yet known at this time. There are also a large number of tools that also support tar, which also have a graphical interface, such as the free 7-Zip.
The tar help is displayed with call the option help.
C:\> tar -help
List: tar -tf <archive-filename>
Extract: tar -xf <archive-filename>
Create: tar -cf <archive-filename> [filenames...]
Help: tar --help
In Windows 10 and Windows 11 you will find another tool that is popular and widespread among Linux users. Microsoft delivered cURL almost unnoticed, in the context of release updates. cURL (Client for URLs) is a command line program for transferring files that has long been included in many Linux distributions.
Tar and Curl are coming to Windows
Starting with Insider Build 17063, we are introducing two command-line tools to the Windows toolchain: curl and tar. It took a long time, I know. We’d like to recognize the people who built and maintain tar and curl – fantastic open source tools used by millions of people every day. Let’s take a look at two powerful ways these tools make developing on Windows an even better experience.
Basic components of the toolbox
Tar and Curl are staples in a developer’s toolbox. Starting today, these tools are available for all Windows SKUs via the command line. And yes, they are the same tools you have come to know and love! If you are not familiar with these tools, here is an overview of how they work:
Tar: is a command line tool that allows a user to extract files and create archives. There was no way to extract a file from cmd.exe outside of PowerShell or with installing software. We are correcting this behavior :) The implementation we ship in Windows uses libarchive.
Curl: is another command line tool that allows transferring files to and from servers. So, for example, you can download a file from the Internet.
Command line file transfers
Now it is possible to do more than just file transfers via the command line. But also extract files in formats other than .zip (such as .tar.gz). PowerShell already offers similar functionality (it has Curl and its own file extraction utilities). Microsoft recognizes that there may be cases where PowerShell is not readily available or the user may wish to remain in cmd.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?