X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 149073858C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1723070515; bh=J84t+UHxQCEOgLzp0wff6zBDcNlqp0nwvJvk4BK7tZ4=; 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=UqMwH9C9laclbahp2aEzoj4LHP30IypoFWl/NOBzUolhEtYY2dOCb0BxX3DvwYO8f j3MdbxCMiPeXVm1xdGH3D6utXcRtcSmtJgJ8dPOBfh4OIG3XOBKCnLMXOuT2k7zXHG /crhPTk9Vp4frEOBMQQsLQx79MW2q5tc0N48hszM= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B381C3858CD9 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B381C3858CD9 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723070494; cv=none; b=YFMgW7aNF8qVe0yDgwlTjpqxvsm3eS7OhpQiUq1pPhJtn3sCrl6hwTfxmTUu+PzRoSs+kUdjKOoKi/+BZxrrEtiRruBHTy+kBW65V1zLx9Au7H5jJpcawVuYk96b0oRLzNL7DrEdcXpX8Hz1Y6PfkrWu8rZdiDURYD9vbJaint8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723070494; c=relaxed/simple; bh=F6MZk/rWaHTWX4g9G+6kHuoOCGohKcNLgusKix5SwLo=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=cKL95C67bxSn1N27ApE9SqWigPp6ymPrjy2iqHB9T8Pv3fDNvPGm7CwkCN3XEyhCAw02aOsmi0wI/s6BkzKSnFBxNBX08iqnwZI+iL1VFgyohfRkQ+EVvQieOnG+sokpk3308f36DY68dPEM76A2GZO8vfqmcK8mskJw/ZyX8TA= ARC-Authentication-Results: i=1; server2.sourceware.org Message-ID: <4a483a67-c366-4bc5-b600-2378103a74c9@maxrnd.com> Date: Wed, 7 Aug 2024 15:41:35 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: How to repair the symlinks in a copied cygwin64 tree To: The Cygwin Mailing List References: Content-Language: en-US In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mark Geisert via Cygwin Reply-To: Mark Geisert Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Hi David, On 8/7/2024 1:26 PM, David Karr via Cygwin wrote: > At my work, I had to have my laptop reimagined for various reasons. I had > them save my cygwin64 tree to external storage first. I now have the laptop > back, and I copied the entire tree back in, but now I realize I should have > done this differently, and I'm wondering how best to repair this. Some of > you can probably guess, but now all of the files that were symlinks in > Cygwin are now very small data files. I can tell they used to be symlinks > because when I cat one, it shows "!" in the first characters. > > What is the best strategy for repairing this? The most simple-minded > approach that I can see is simply renaming the cygwin64 tree to get it out > of the way, and then just reinstalling Cygwin, and then copying in all the > files in my cygwin home directory in the saved tree. I will likely guess > wrong on what packages I had installed before. Is there some way I can > simply repair the symylink files directly? If the path to Windows' attrib.exe is in your path (use 'which attrib' to check) then you can simply 'attrib +I +S ' the file that contains "!". > Besides the symlink problem, is there anything else that I might have > broken by doing it this way? That I don't know. > I'm guessing the correct way to have done this would have been instead > storing the "tar czpf" output in external storage. I think that would have > preserved the symlinks and restored them properly with "tar xzf". That looks good OK me but I've never had to try it, so YMMV. HTH, ..mark -- 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