From owner-freebsd-questions@FreeBSD.ORG Sat Aug 2 23:53:19 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3599106566B for ; Sat, 2 Aug 2008 23:53:19 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.29]) by mx1.freebsd.org (Postfix) with ESMTP id 6733B8FC25 for ; Sat, 2 Aug 2008 23:53:19 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so703449ywe.13 for ; Sat, 02 Aug 2008 16:53:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=aLAO7zABpwxGw/6C5DXrb2ip38Pmvr/RyMEfK2BB50I=; b=cL+VCntVj4RUUsR2PZ332qahPoR0zv6GVbOU/dyrytpypNATHUyUvja0b4UzJqEjIj q8KLh+VyKQtkSfS13zDpsnrRzQb05SFafWj00KVgtWgyLAHXUNIq/Y6y0obvVgjmE9lj vaXu9lszfKxGRl5h23X0uEfGnqPbgNdjVaCF4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references; b=x1J1s/UfMZxQc6Iku61afeucfFWFsAPAGsiSRgCJL6oVk6HijRm92maZQ4lj8xwmLb C0n0BNd/lhFeBFJ24/3ID9pP8gZWEy0/2ff7M9PBM8+IOahRtXQDLJBJIFJ+j5Pb/CYc /E+wwSs30GeEMm/sE3uIY/2Cd7iQcWK3/SVnY= Received: by 10.151.153.14 with SMTP id f14mr5742443ybo.29.1217721198781; Sat, 02 Aug 2008 16:53:18 -0700 (PDT) Received: by 10.150.140.14 with HTTP; Sat, 2 Aug 2008 16:53:18 -0700 (PDT) Message-ID: <8cb6106e0808021653h491c8ac0re3c2f4cd067e8c98@mail.gmail.com> Date: Sat, 2 Aug 2008 19:53:18 -0400 From: "Josh Carroll" To: perryh@pluto.rain.com In-Reply-To: <4894ef2e.2NiKL22MfAcdbs27%perryh@pluto.rain.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4894ef2e.2NiKL22MfAcdbs27%perryh@pluto.rain.com> Cc: freebsd-questions@freebsd.org Subject: Re: undocumented tar --unlink switch X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: josh.carroll@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Aug 2008 23:53:19 -0000 > Around line 37 of /usr/src/usr.sbin/pkg_install/add/extract.c > there's an invocation of /usr/bin/tar with a --unlink switch, > which I don't see mentioned in the tar(1) manpage. Anyone > happen to know what this does, or do I need to dig into the > code? My guess was that it was the long option version of -U: -U (x mode only) Unlink files before creating them. Without this option, tar overwrites existing files, which preserves existing hardlinks. With this option, existing hardlinks will be broken, as will any symlink that would affect the location of an A quick perusal of the source confirms. Josh