From unknown Mon Aug 18 11:11:26 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#13464 <13464@debbugs.gnu.org> To: bug#13464 <13464@debbugs.gnu.org> Subject: Status: Readlink Bug - Displays absolute path of a non existent file also Reply-To: bug#13464 <13464@debbugs.gnu.org> Date: Mon, 18 Aug 2025 18:11:26 +0000 retitle 13464 Readlink Bug - Displays absolute path of a non existent file = also reassign 13464 coreutils submitter 13464 PK severity 13464 normal tag 13464 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 16 13:07:42 2013 Received: (at submit) by debbugs.gnu.org; 16 Jan 2013 18:07:42 +0000 Received: from localhost ([127.0.0.1]:35573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvXOm-0000tz-Hl for submit@debbugs.gnu.org; Wed, 16 Jan 2013 13:07:41 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53980) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvXNP-0000rf-Ny for submit@debbugs.gnu.org; Wed, 16 Jan 2013 13:06:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvXMm-00028o-Vk for submit@debbugs.gnu.org; Wed, 16 Jan 2013 13:05:39 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:37649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvXMm-00028j-Rv for submit@debbugs.gnu.org; Wed, 16 Jan 2013 13:05:36 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvXMk-0008Gf-Av for bug-coreutils@gnu.org; Wed, 16 Jan 2013 13:05:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvXMh-000286-EA for bug-coreutils@gnu.org; Wed, 16 Jan 2013 13:05:34 -0500 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:57875) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvXMh-00027q-2K for bug-coreutils@gnu.org; Wed, 16 Jan 2013 13:05:31 -0500 Received: by mail-wi0-f169.google.com with SMTP id hq12so3813058wib.0 for ; Wed, 16 Jan 2013 10:05:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=Jqn0cSez/1fN1NmbbnV/b+5oMNcr7bhhtCEo599dlME=; b=OL1BRKDNWBqxh6UlcqzRX2OXVAdlhJ5BW6Kvmqn6W/IhWXlUciMKvOw4BEzuiMp5bT ZN9x7YHsh+ddAZIg0wxQH1Piyoe1al9YAjlWBRig8Aa/F1VRPVSIK4EUOScqKA2dZYsE huJt8tmNXo8XecsCLODZ3hIJOsJ0sgg03wlIQj5Toi1EfmLGzISl+Rpn+qEyO9E79QXz a0aWPAP5cDVNWBScpI8L/vlTcsGvo54lEpdSrmASXc/mHgarMQq5rJlbUkI5sk4XKwVx ZDd13cpy3kbEEUw3eFA2/tKUzDMmsAKQyFxNeJG3b5fOYz36X24FHzQyz/E210PJ3GfD eXKA== MIME-Version: 1.0 X-Received: by 10.180.88.40 with SMTP id bd8mr3658014wib.33.1358359526947; Wed, 16 Jan 2013 10:05:26 -0800 (PST) Received: by 10.194.172.166 with HTTP; Wed, 16 Jan 2013 10:05:26 -0800 (PST) Date: Wed, 16 Jan 2013 12:05:26 -0600 Message-ID: Subject: Readlink Bug - Displays absolute path of a non existent file also From: PK To: bug-coreutils@gnu.org Content-Type: multipart/alternative; boundary=f46d04428f1214bb1504d36bb9a3 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 16 Jan 2013 13:07:38 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) --f46d04428f1214bb1504d36bb9a3 Content-Type: text/plain; charset=ISO-8859-1 Hi, readlink -m displays the absolute path of a The bug is that it displays, even if the file is non-existent. This does not solve the purpose and I see it creates more ambiguity in showing a non-existent file. thanks, PK --f46d04428f1214bb1504d36bb9a3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,
readlink -m <file> displays the absolut= e path of a <file>

The bug is that it displays, even if the file is non-existent.<= /div>

This does not solve the purpose and I see it creates more ambiguity in= showing a non-existent file.

thanks,
PK
--f46d04428f1214bb1504d36bb9a3-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 16 16:44:49 2013 Received: (at control) by debbugs.gnu.org; 16 Jan 2013 21:44:49 +0000 Received: from localhost ([127.0.0.1]:35721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvamt-00078d-TU for submit@debbugs.gnu.org; Wed, 16 Jan 2013 16:44:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:18018) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tvamq-00078F-1y; Wed, 16 Jan 2013 16:44:46 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0GLi5Bg007011 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 16 Jan 2013 16:44:05 -0500 Received: from [10.3.113.75] (ovpn-113-75.phx2.redhat.com [10.3.113.75]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r0GLi4JP030249; Wed, 16 Jan 2013 16:44:05 -0500 Message-ID: <50F71F24.5030104@redhat.com> Date: Wed, 16 Jan 2013 14:44:04 -0700 From: Eric Blake Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: PK Subject: Re: bug#13464: Readlink Bug - Displays absolute path of a non existent file also References: In-Reply-To: X-Enigmail-Version: 1.5.0 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2HJLNMMUTTWMVDFWUXUDP" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: control Cc: 13464-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2HJLNMMUTTWMVDFWUXUDP Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable tag 13464 notabug thanks On 01/16/2013 11:05 AM, PK wrote: > Hi, > readlink -m displays the absolute path of a >=20 > The bug is that it displays, even if the file is non-existent. But that is what -m (--canonicalize-missing) is _documented_ to do. If you want to fail for missing files, use -e (--canonicalize-existing); if you want to probe whether a file name can be created (that is, the directory portion exists), use -f (--canonicalize). >=20 > This does not solve the purpose and I see it creates more ambiguity in > showing a non-existent file. Sorry, but I don't see this as a bug, but a feature - the fact that we have three different options with three different levels of existence checks was intentional. I'm closing this bug, but you can feel free to add further comments or questions. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2HJLNMMUTTWMVDFWUXUDP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJQ9x8kAAoJEKeha0olJ0NqqWUIAKCvS+GZvyeafxODAJuEGnay zW9OdDmABSW6k/8hNYQ/WBplYBHV4pQ3dsa4BJd72Rp477Wr/mxjYjAJSyP89sdG gZdNBSvRuv3YT0NI9DXT2hLr3BUrg7oJMNXClJrnucSAjsekV36rAjBOiF3LhL3u 67zMdj+kS5DGYCbfyCTie45sJln27J3fCnNmAnEbJaN2q9Pol1HvYRiM+v/QbxgV WeDHvNg4pRMpP4Yco9aEf0gWn+kGAHrKq7sotTrPcgW78RUevtAwJvOZHuAp09Sl Kjg4rctkwGu1I6K3WMVUCm+h1Jhzih7ptV+Q4Giy5WZpDj5MunCneJMDtqEbzCU= =ZE54 -----END PGP SIGNATURE----- ------enig2HJLNMMUTTWMVDFWUXUDP-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 16 16:47:13 2013 Received: (at 13464) by debbugs.gnu.org; 16 Jan 2013 21:47:13 +0000 Received: from localhost ([127.0.0.1]:35730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvapF-0007DY-9I for submit@debbugs.gnu.org; Wed, 16 Jan 2013 16:47:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36179) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvapB-0007DM-PT; Wed, 16 Jan 2013 16:47:11 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0GLkVQL012381 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 16 Jan 2013 16:46:32 -0500 Received: from [10.36.116.23] (ovpn-116-23.ams2.redhat.com [10.36.116.23]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r0GLkTDK005207 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 16 Jan 2013 16:46:30 -0500 Message-ID: <50F71FB4.10101@draigBrady.com> Date: Wed, 16 Jan 2013 21:46:28 +0000 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: PK Subject: Re: bug#13464: Readlink Bug - Displays absolute path of a non existent file also References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 13464 Cc: 13464@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) tag 13464 notabug close 13464 stop On 01/16/2013 06:05 PM, PK wrote: > Hi, > readlink -m displays the absolute path of a > > The bug is that it displays, even if the file is non-existent. > > This does not solve the purpose and I see it creates more ambiguity in > showing a non-existent file. $ readlink -m /canonicalize/blah/../a/path /canonicalize/a/path From unknown Mon Aug 18 11:11:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 14 Feb 2013 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator