X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4CAB4385840C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1700200498; bh=8xMjZzcCDGW7lmoL7bvaeByaSRS6y8Y9kCCbmA73Zn4=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=V+rZAPGcuk7l8AS0FxYyqiKXXf8o2/PK59Cru+pnyWH/X3qLzsQQ7/ftLtHtO23en Njw8P8DohDwDiO7eaymsbXFLoMAAIwtxhuXDsUr3wPhUD9pLR/bSfL1gugap60vwQP 28UAXO/pqDbpDjtWkC6UbkHLtmwpwddY0GkUNMKI= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9526D3858D20 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9526D3858D20 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700200484; cv=none; b=NnDcjlUYnCqr7JzMg4tPmdlrzGW/fyAt6MToCtiS9Go7QG57UH55eFsICeMYaf/ak3MUS+a6vfqjFZeKSM48NG9r4Das23b5WFBip8juLzmaa7sF/amQFk3mnqHVJpWDVTGgTg5jSMWCtJ0iZCFGUx3EByt5RA/CKqYy/G53zVM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700200484; c=relaxed/simple; bh=0B7Pugl0/bMo0CAvX5jPA34X8fRGip53xfP57CCAx+M=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=ZM+YfDLmx6vd3V88ut/Ws5JzPQlVrNeDTk2ubYCn9GmM7puRSMe2N9B7DbbLdrUXOF1yZP1MQNqnRzhTMMulnMtBhrZGCdIzd+f4DJvNjlscbhksEayrGNIdbk6KlK5ZhxGS4zb/pGsXhs0q3vVvkqBW0OzhNOQNjfbxiIx3dus= ARC-Authentication-Results: i=1; server2.sourceware.org Message-ID: <39d6c013-f929-49c1-948a-810383959a1b@towo.net> Date: Fri, 17 Nov 2023 06:54:40 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Cygwin tool to differ junctions from soft links? To: cygwin AT cygwin DOT com References: <48998319 DOT 20231116114707 AT yandex DOT ru> <1439487749 DOT 2493319 DOT 1700160923985 AT mail DOT yahoo DOT com> <6752f3b0-0fbf-4709-976c-12030285e0bb AT Shaw DOT ca> Autocrypt: addr=towo AT towo DOT net; keydata= xsDNBGNaf3QBDACVevqudcTSevLThXKQPU1QpaDxtGuYjtwmr7i9wXxVGih4Y4oxOJN4PYlu KBX9IVAI4651dA+xYtXuyIkWOPZWyyzkGKavQOn3Q7dk09oj7bh2IwOndpxXXde337D408EQ bQEGbMHr9lOWhSAideowzgCeFIvGTf2AovbPh97HpexJn1/HCRiRAhTNlrkS1DByUgCAeEMK fEr6aGM/Ou29MT+eTnQwOIZTnl9Z9LxM2FtqqMH3MycC7I2OoW3XXhuL8BPQdyJUjWa0/J11 Oo5jFkRXtWenIns6jGn18oW72jnDmo9jXwwS+iZWAV6Y51nhD7jSC+3xs9ORmPCdtHUSpTr1 zh67UueUJ3DUUNVuA25Hn/9EJMJ2L60BGUEr88NEB6pcZhmcwdkurAQeYT6t+frzBz2ctsoN BoxP/Xc02yd+z7hXWRRMrJWh9WHlQHA3Z4FfmyNhyPhs3MgKTJ1E9QfzGquigAmF3/k/Dc1m 7cSOKhGYhpEJdSpdXccJFKkAEQEAAc0cVGhvbWFzIFdvbGZmIDx0b3dvQHRvd28ubmV0PsLB BwQTAQgAMRYhBHUiRKsHn5d8BpWdP8bz0e72Bp0CBQJjWn93AhsDBAsJCAcFFQgJCgsFFgID AQAACgkQxvPR7vYGnQKSMAv8Di+8MXB2mcfsemRdShfLLKcLOv+d0CXAtPVaY3XKxbKpRvC9 +AAT5wIHYjQft77/b2y87vGIh+nQ5hKLtNtQPSDtqG/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07ESgA78iQccma84HEQHvOXiVrp hYGiBatp7GaF5rXR85uzeUU6eLcb1aDH+QmdvzLIZ1mUVF9ii5twHLrc5EqTj9MFdUoe3ymd5 yayjrFBF/BdVhMfr0hqNq0WfZ2AObqrIJhE3kQ+x8ebNCVq0OZVwOzWkRNm1bclI1baxOKUTf HY0E50YYOypQdx18e2uZz74yf1tTw/CRzdK3I4k7WnPPeJnffLnnk8C6vMCoWmIxXhwoDSclR 1bffaUSIVs+YHTzJ6OCmG0yl62T1dcV0m4EVKsSfWhxrvFL5/vCehgz6ddp4W4jvpWRwVXCc+ 5MM9I15SeAuka5FUHpnBm2W87984w3y5cuEGojAZiM5/2wjM7BZLQPzo6HH18iI0aI82dQKwr i3VUPvn6pY8DaIkWn2V7e+Y+if8wsdIZkPiMMLcN7MaxeiEsBYC49yuk8j1huqmw5UhRPd8ID IVCbh3xrcl+oHjhSDjQb9HsXVkX53bISzUjI8y2QuJgETfhqVbws52E+Fc9UCHfmkugQn+CqZ 09C/57HQefys57DouQ+7jNzCfWMxH797jguqRT9rQAaPfXBY4la3Ae0EIpp/YZXHnlPoeKqbZ ZXTtzKlk4Yaa90w== X-Spam-Status: No, score=2.5 required=5.0 tests=BAYES_00, BODY_8BITS, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Thomas Wolff via Cygwin Reply-To: Thomas Wolff Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 3AH5sxkw018664 Am 16.11.2023 um 21:30 schrieb Brian Inglis via Cygwin: > 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. lsattr has an explicit flag:              'r', 'Reparse':       file or directory that has a reparse point I don't know whether it's the same as a junction, otherwise a 'j' flag could be added. > > 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 > -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple