every flag on `unzip` has the most cursed docs i've ever seen https://linux.die.net/man/1/unzip
unzip(1) - Linux man page

unzip will list, test, or extract files from a ZIP archive, commonly found on MS-DOS systems. The default behavior (with no options) is to extract into the ...

@Gankra thanks for the eye cancer
@Gankra of course there is a flag that does completely different things depending on the OS
@ruhrscholz @Gankra “This is a shortcut for ---a”
Thanks, I hate it.
@ruhrscholz @Gankra Those OSes need that conversion maybe lol
@Gankra Well, I didn't need to sleep tonight anyway. 😅

@Gankra "This option is not listed on the unzip usage screen."

Yep. Cursed is the right word.

@Gankra unlike #tar where you just have to imagine some german with horrible accident to remember the flags like:

"xtract ze filez" and "compress ze files"...

@kkarhan @Gankra Modern GNU and BSD tar auto-detect format from file headers when decompressing, and from the file name you give to '-f' when you compress with the '-a' flag.

BSD tar also supports zip files, amongst other things (cpio, rar, 7z, iso, lha, shar...)

@Gankra It’s crazy. I tend to use Java’s “jar” tool as a “zip-with-tar-like-interface” on the command line (but it’s not installed everywhere), or “7z”.

Also, if neither jar nor 7z are installed, “python3 -m zipfile” can work:

https://docs.python.org/3/library/zipfile.html#command-line-interface

..so lots of options to avoid unzip :)

zipfile — Work with ZIP archives

Source code: Lib/zipfile/ The ZIP file format is a common archive and compression standard. This module provides tools to create, read, write, append, and list a ZIP file. Any advanced use of this ...

Python documentation
@thp @Gankra Another option is https://github.com/mholt/archiver which can work like dtrx.(Use v3 for now.)
GitHub - mholt/archiver: Easily create & extract archives, and compress & decompress files of various formats

Easily create & extract archives, and compress & decompress files of various formats - GitHub - mholt/archiver: Easily create & extract archives, and compress & decompress files of ...

GitHub
@Gankra `unzip` is why I have Linux CLI trust issues
@Gankra oh man “freshen” just unlocked some super old memories from the DOS days. It actually made sense when disks were so slow!
@Gankra Yeah, no, I'll stick to my `tar cf - myFile.txt | xz > myFile.txt.tar.xz` method, thanks. If I need to get fancy with file attributes, I'll stay in UNIX-friendly land. https://gitlab.com/baltakatei/baltakatei-exdev/-/blob/b9f7f61801c58ec9d948a4ddf442b54d96790bf8/user/bkxz
user/bkxz · b9f7f61801c58ec9d948a4ddf442b54d96790bf8 · Steven Baltakatei Sandoval / baltakatei-exdev · GitLab

Personal Executable Development

GitLab