I was a bit surprised to find that my basic MSYS2 system doesn't seem to contain 'tar'.
Google found me a previous discussion on this: https://sourceforge.net/p/msys2/mailman/message/35725575/ so I tried the commands suggested there: DayToDay01@SAMSUNG-NP350 MSYS ~ $ tar bash: tar: command not found DayToDay01@SAMSUNG-NP350 MSYS ~ $ which tar which: no tar in (/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl) DayToDay01@SAMSUNG-NP350 MSYS ~ $ pacman -Qs ^tar$ DayToDay01@SAMSUNG-NP350 MSYS ~ $ pacman -Ss ^tar$ msys/tar 1.29-1 (compression) Utility used to store, backup, and transport files DayToDay01@SAMSUNG-NP350 MSYS ~ Obviously I could install that last-named package. But I also found via pacman that the system does have a version of tar, namely bsdtar: DayToDay01@SAMSUNG-NP350 MSYS ~ $ pacman -Ss tar mingw32/mingw-w64-i686-xmlstarlet-git r678.9a470e3-2 Command-line XML toolkit mingw64/mingw-w64-x86_64-xmlstarlet-git r678.9a470e3-2 Command-line XML toolkit msys/bsdtar 3.3.2-1 (base) [installed] library that can create and read several streaming archive formats msys/perl 5.24.1-3 (base-devel) [installed] A highly capable, feature-rich programming language msys/tar 1.29-1 (compression) Utility used to store, backup, and transport files DayToDay01@SAMSUNG-NP350 MSYS ~ If I do a man bsdtar it lists output starting TAR(1) BSD General Commands Manual ... NAME tar — manipulate tape archives The bsdtar.exe is in \usr\bin DayToDay01@SAMSUNG-NP350 MSYS ~ $ bsdtar --version bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.11 liblzma/5.2.3 bz2lib/1.0.6 DayToDay01@SAMSUNG-NP350 MSYS ~ I looked for more info on it: DayToDay01@SAMSUNG-NP350 MSYS ~ $ pacman -Si bsdtar Repository : msys Name : bsdtar Version : 3.3.2-1 Description : library that can create and read several streaming archive formats Architecture : x86_64 URL : http://libarchive.org/ Licenses : BSD Groups : base Provides : None Depends On : gcc-libs libbz2 libiconv liblzma liblzo2 libnettle libxml2 zlib Optional Deps : None Conflicts With : None Replaces : None Download Size : 861.43 KiB Installed Size : 3555.00 KiB Packager : Alexey Pavlov <alex...@gmail.com> Build Date : 07 Sep 2017 06:17:30 Validated By : MD5 Sum SHA-256 Sum Signature Does the Groups: base part of that mean that it came with the original install of MSYS2? If it does does that mean that whoever created the installer had decided that this should be in it rather than tar, or might it be an oversight? Later I remembered that when I ran the MSYS2 installer it offered me the option to View 'details' at the end of its run, and I'd saved those. Searching that file showed me that bsdtar-3.2.1-1 was installed right at the start. I'd used the installer from http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20161025.exe After that base install I'd run: pacman -Syuu several times; one of those updated bsdtar to bsdtar-3.3.2-1 My only purpose in doing all of this is to try to build some open-source software to run on Windows. I'm expecting that build scripts will want to issue tar commands. I have no idea whether I should install tar as well as the BSD version. I presume that whoever built the MSYS2 installer chose to put bsdtar in it on purpose, but could that be a mistake? Or is there a good reason to use the BSD version? Safer? More versatile? If I wanted scripts that issue tar commands to execute bsdtar.exe how should I achieve that? Is it doable by an alias definition in bash? Even if it is, is it a good idea? -- Jeremy Nicoll - my opinions are my own. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Msys2-users mailing list Msys2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/msys2-users