- unzip には
tar -xf my_archive.zipを使用する - Windows10 は version 1809 以降、標準で
tarとcurlが使える tarを持たない最後の Windows10 は version 1803 Enterprise Edition。2021年5月11日にサポート終了予定
以下、コマンドプロンプトで確認
C:\>where tar
C:\Windows\System32\tar.exeカレントディレクトリにzipを展開:
tar -xf my_archive.zip別のディレクトリに展開:
mkdir my_output_dir
tar -xf my_archive.zip -C my_output_dirtar は自動で出力先ディレクトリを作らない。事前に mkdir しておく
version 1809 (October 2018 Update) 以降、全ての Windows10 は tar (bsdtar) と curl を持つ
Beginning in Insider Build 17063, we’re introducing two command-line tools to the Windows toolchain: curl and bsdtar. ... beginning today, you’ll find these tools are available from the command-line for all SKUs of Windows.
- Home, Pro のみなら、2020年1月以降、サポート中の全バージョンで
tarが使用可能 - Enterprise, Education も含めるなら、2021年6月以降、サポート中の全バージョンで
tarが使用可能
理由 : tar を持たない最後の Windows 10 は version 1803。このバージョンのサポート終了日は下記
| エディション | サポート終了日 |
|---|---|
| Home, Pro | 2019年11月13日 |
| Enterprise, Education | 2021年5月11日 |
- 参照
Windows 10 (version 20H2, build 19042.804) で確認
C:\>ver
Microsoft Windows [Version 10.0.19042.804]
C:\>tar --version
bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.5.f-ippついでに curl も
C:\>where curl
C:\Windows\System32\curl.exe
C:\>curl --version
curl 7.55.1 (Windows) libcurl/7.55.1 WinSSL
Release-Date: 2017-11-14, security patched: 2019-11-05
Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL