Unzip utility choice decision

Dangling Pointer danglingpointer at outlook.com
Fri Nov 20 22:18:25 UTC 2015

The unzip utility which comes OOTB is different than the one which installs with `pkg install unzip`. The latter one is the real unzip utility which accepts -uoq switches together. The former one complains "unzip: -n, -o and -u are contradictory".
Without being able to -uoq causes a race with two unzips attempting to overwrite the same file at the same time. -u prevents existing files from being overwritten if they haven't been updated and allows us to run any number of unzips in parallel.
After installing FreeBSD, I have to rename "/usr/bin/unzip" to "/usr/bin/unzip2" followed by "pkg install unzip" and then "ln -s /usr/local/bin/unzip /usr/bin/unzip".
If the licensing permits, please consider replacing the default unzip utility with the one available in ports. This way it is convenient to write a cross-platform build/install scripts for software without additional checks.


More information about the freebsd-questions mailing list