X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2056C3858C39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=yandex.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yandex.ru X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1661194201; bh=4l4TWHox8ERqnDyv+mzhV+dzfMPPA2ftfveRxMrhJMo=; h=In-Reply-To:Subject:Date:References:To:Message-ID:Reply-To:From; b=N/Sy1CFKFwGKacM6DXHIWHtZmTrtbEQGpSomyCo4mFRV8dxgF+PX0SyWRmS4gpeVN nICTHRT5PGYaizE4J9yXWKoUlxMWQj5p+E/R1ywYlDwyBB1R8P48wllipVoFwCToka B1X/2/2P2uGxUy6wk6yDKQyE3n3/hi+W/IBxBqCs= Authentication-Results: myt5-89cdf5c4a3a5.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Date: Mon, 22 Aug 2022 21:43:14 +0300 From: Andrey Repin X-Mailer: The Bat! (v9.3.4) Professional Message-ID: <1374387774.20220822214314@yandex.ru> To: Andrey Repin , cygwin AT cygwin DOT com Subject: Re: Broken links in Cygwin installation In-Reply-To: <1755994279.20220822191254@yandex.ru> References: <1839725171 DOT 20220821144244 AT yandex DOT ru> <1755994279 DOT 20220822191254 AT yandex DOT ru> MIME-Version: 1.0 X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_THEBAT, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 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.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Greetings, Andrey Repin! > Small background: I've been moving my Cygwin installations around to match > path locations between different systems. I've ended up with a lot of broken > symlinks, between which some are actually lost. > I've baked a PowerShell script to solve the issue (see attachment). > Also in attachment a powershell startup wrapper for /usr/local/bin/ find -L / -xdev -type l -execdir fixmylinks.ps1 OldPathFragment New\\PathFragment '{}' + In all broken links, script will look for "OldPathFragment", and if replacing the fragment with "New\\PathFragment" produce valid existing path, it will create a new link in place. -- With best regards, Andrey Repin Monday, August 22, 2022 21:38:22 Sorry for my terrible english... -- 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