From owner-freebsd-questions@freebsd.org Wed Dec 23 05:57:37 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87568A50B69 for ; Wed, 23 Dec 2015 05:57:37 +0000 (UTC) (envelope-from danglingpointer@outlook.com) Received: from BAY004-OMC1S22.hotmail.com (bay004-omc1s22.hotmail.com [65.54.190.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6FDE9179E for ; Wed, 23 Dec 2015 05:57:37 +0000 (UTC) (envelope-from danglingpointer@outlook.com) Received: from BAY169-W71 ([65.54.190.60]) by BAY004-OMC1S22.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Tue, 22 Dec 2015 21:56:31 -0800 X-TMN: [dCFaHqy0ollmSl7Dz2diayp0Bd+uIe/J] X-Originating-Email: [danglingpointer@outlook.com] Message-ID: From: Dangling Pointer To: Ben Woods CC: "freebsd-questions@freebsd.org" Subject: RE: Unzip utility choice decision Date: Wed, 23 Dec 2015 05:56:31 +0000 Importance: Normal In-Reply-To: References: , MIME-Version: 1.0 X-OriginalArrivalTime: 23 Dec 2015 05:56:31.0273 (UTC) FILETIME=[ABF9B990:01D13D46] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Dec 2015 05:57:37 -0000 Those options are not contradictory with `pkg install unzip` version. That = -uoq combination is an advance usage which save us from a race condition. What I am really saying is: There is a universally known unzip utility which offers many options and th= en there is FreeBSD version of unzip with less options. That makes no sense= to me. Why would you want to have a separate unzip utility? > Date: Sat=2C 21 Nov 2015 09:02:19 +0100 > Subject: Re: Unzip utility choice decision > From: woodsb02@gmail.com > To: danglingpointer@outlook.com > CC: freebsd-questions@freebsd.org >=20 > On Friday=2C 20 November 2015=2C Dangling Pointer > wrote: >=20 > > > > > > > > Hi=2C > > The unzip utility which comes OOTB is different than the one which > > installs with `pkg install unzip`. The latter one is the real unzip uti= lity > > which accepts -uoq switches together. The former one complains "unzip: = -n=2C > > -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 fr= om > > being overwritten if they haven't been updated and allows us to run any > > number of unzips in parallel. > > After installing FreeBSD=2C 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=2C please consider replacing the default unzip > > utility with the one available in ports. This way it is convenient to w= rite > > a cross-platform build/install scripts for software without additional > > checks. > > Thanks. > > >=20 > Having just read the manpage of both the FreeBSD version and the info-zip > version=2C it sounds to me like those -o and -u options ARE contradictory= . >=20 > -o tells unzip to overwrite any existing files. >=20 > -u tells unzip to only overwrite any existing files if the version from t= he > zip is newer. >=20 > It doesn't make sense to me to use both of these switches. You should > choose which behaviour you want and only specify one of them. Perhaps > "unzip -uq FILE.zip" will suffice? >=20 > Info-zip unzip(1) manpage: > http://linux.die.net/man/1/unzip >=20 > FreeBSD unzip(1) manpage: > https://www.freebsd.org/cgi/man.cgi?unzip >=20 > Regards=2C > Ben >=20 >=20 > --=20 >=20 > -- > From: Benjamin Woods > woodsb02@gmail.com > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe=2C send any mail to "freebsd-questions-unsubscribe@freebsd= .org" =