From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) by sourceware.org (Postfix) with ESMTPS id ADA703858D32 for ; Thu, 16 Nov 2023 20:30:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ADA703858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=Shaw.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=shaw.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org ADA703858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=3.97.99.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700166630; cv=none; b=ZehtnUi94pKx3s5hEklxSMEPdpwIPHsAohDC+tcOUQFsUg9BDDJ/ruJUOJDrxjtcXq6rGv2eYAbogLgsxlZ8wl10h8h15xuFyPJd8RlcCoEiPELCY5i8aLsZy+T72wInd4XR/jgBj6k0ZraTtQUiNeaLtoqeepKxHDNNXNgKPBo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700166630; c=relaxed/simple; bh=4ntkQ4s6TeY+YiLjrSRVFsYJVWcjmdgIDuPmbYk7OMU=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=tPzHKl7s0ClPIsRg1CvFJAYYOVlf+NzENKGv/4GrZtXUkbZwuzEQfzP/EdepwiXPob3Ge0TVO+362iVT3f5spqokSqTnhzQutCXgd2lmKwGCaGbpXAf9P186YC0pvyDT5O5WP/DRawrajfcx50cYdlokJaBaGyccVEd1rLkczHw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTPS id 3gMIr7FrQB0n03j0Nrkkiv; Thu, 16 Nov 2023 20:30:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=shaw.ca; s=s20180605; t=1700166627; bh=4ntkQ4s6TeY+YiLjrSRVFsYJVWcjmdgIDuPmbYk7OMU=; h=Date:Reply-To:Subject:To:References:From:In-Reply-To; b=uAdYxXNi2eTxrXMBzJuq1Y7khRKF4P6HOFRPqNpHd+uX7E8Qelb2+E+MwZSrkzaOE Up28YxHhG9qbzA+CdC2CWR15g1VIb1MLm0sDHID4rlyUhXGScP/nUOqOOo9NCDGHqe AGGbooZEjpzs/OzbI0kdVfIHuFbnCS4ezD0Vz72dxLQhpPdY56wpHG5YmbmrF9T581 CvHfo+jFj2lSy5/9g8lvemT8LdPS1V/sCPrAavy01sXuHKMtYsTrCquEQwvIJKTqlV gaYqc+FXOFoKSGI9TMmRFdFdCAaUprYCe1supDhqnDYgVsVIfIrfwvNDwL3aKEgmQK Q5+amnaiULfBQ== Received: from [10.0.0.5] ([184.64.102.149]) by cmsmtp with ESMTP id 3j0MrcLgNU5YW3j0Mr07HA; Thu, 16 Nov 2023 20:30:27 +0000 X-Authority-Analysis: v=2.4 cv=CZQbWZnl c=1 sm=1 tr=0 ts=65567be3 a=DxHlV3/gbUaP7LOF0QAmaA==:117 a=DxHlV3/gbUaP7LOF0QAmaA==:17 a=IkcTkHD0fZMA:10 a=FfVa6YyVAAAA:8 a=NEAV23lmAAAA:8 a=w_pzkKWiAAAA:8 a=uuUOWmWZWj-B1yBV1rMA:9 a=QEXdDO2ut3YA:10 a=YA-VbQCo1SUA:10 a=pwUoXiQdmvIA:10 a=Lz48L_9qCwoA:10 a=UiCPdkfYahhcG6y9nT3T:22 a=sRI3_1zDfAgwuvI8zelB:22 Message-ID: <6752f3b0-0fbf-4709-976c-12030285e0bb@Shaw.ca> Date: Thu, 16 Nov 2023 13:30:26 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Reply-To: cygwin@cygwin.com Subject: Re: Cygwin tool to differ junctions from soft links? Content-Language: en-CA To: cygwin@cygwin.com References: <48998319.20231116114707@yandex.ru> <1439487749.2493319.1700160923985@mail.yahoo.com> From: Brian Inglis Organization: Inglis In-Reply-To: <1439487749.2493319.1700160923985@mail.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfFzeYJlE/Aen172rIiNANAfJixsdZZs/pix6SR44GD3yF8O6ux5vITm8nA3NnN40jf/RIOu0F3gmpehOqcVgO1CIIZZU066Q2WG+cVwaRUeJXhxMBXK1 yZjRRnX8TBkZl0VpKnyQ/FZo1ENF5mxGNDxh0rhQMI0/s9FF16G6iH+UHFwQANmh4HIyIP3dhwnM0w== X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023-11-16 11:55, matthew patton via Cygwin wrote: > On Thursday, November 16, 2023 at 03:50:24 AM EST, Andrey Repin wrote: >>> Does Cygwin have a command line tool (Scriptable!) which can be used to >>> differ between soft links and Windows junctions? Distinguishing between types of Windows reparse points is not a POSIX or emulation function, so not of interest to Cygwin developers. I thought about it when support was added, but then realized there was no nice place to add it within the platform, without going the non-portable Windows specific utility route, as in lsattr. You could in a function or script by running lsattr -d which seems to fail on reparse points, then ls -dl which shows a Symbolic Link with a relative path, and a Junction with an absolute path, although it could just be a Symbolic Link with an absolute path. Perhaps something like the following would be useful to Windows users who want to know this stuff: https://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html >> It would be easier to help you, if you specify the purpose of your >> request. I.e. what you want to achieve with such tool. > AFAIK no. what I do is re-implement 'ln' with a wrapper because the Cygwin > behavior (Junctions) was driving me up the wall. > https://github.com/tb3088/shell-environment/blob/ccf7aa161899c2c4ebe2d9e980e674bc726a3ef3/.functions_os.CYGWIN_NT#L9 Cygwin never creates Windows Directory or Filesystem Junction reparse points, and by default it uses its own version of Unix path symlink files, preceded by a flag ("magic cookie") value, and with system attribute, to allow compatibility with FAT file system limitations, or else NFS symlinks on NFS filesystems. CYGWIN env var settings allow creation of Windows shortcuts and symbolic link reparse points instead of its default (equivalent to winsymlinks:sys), when supported by the file system and Windows release: https://cygwin.com/cygwin-ug-net/using-cygwinenv.html https://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks -- Take care. Thanks, Brian Inglis Calgary, Alberta, Canada La perfection est atteinte Perfection is achieved non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut -- Antoine de Saint-Exupéry