From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0FA96138334 for ; Sun, 16 Dec 2018 00:06:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E10C7E0BAA; Sun, 16 Dec 2018 00:06:34 +0000 (UTC) Received: from tncsrv06.tnetconsulting.net (tncsrv06.tnetconsulting.net [IPv6:2600:3c00:e000:1e9::8849]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6B802E0B83 for ; Sun, 16 Dec 2018 00:06:33 +0000 (UTC) Received: from Contact-TNet-Consulting-Abuse-for-assistance by tncsrv06.tnetconsulting.net (8.15.2/8.15.2/Debian-3) with ESMTPSA id wBG06UVl015972 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Sat, 15 Dec 2018 18:06:32 -0600 Subject: Re: [gentoo-user] data recovery advice needed To: gentoo-user@lists.gentoo.org References: From: Grant Taylor Organization: TNet Consulting Message-ID: <57366d61-452d-7e5f-513b-1b6d2e8c121c@spamtrap.tnetconsulting.net> Date: Sat, 15 Dec 2018 17:06:34 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Archives-Salt: 516ac232-1ad3-45bb-8592-1d02217baf92 X-Archives-Hash: d17990b4e850ad80a63693d81af420e8 On 12/15/18 4:33 PM, Jack wrote: > Is there any way to fix this other than completely repeating the copy? I'm sure there are other ways, but the first things that comes to mind is touch. Or rather a script that uses touch, and possibly find or a recursive glob. The idea being to have the list of files in (either of) the directories and touch the new copy with the old copy as the date & timestamp reference. touch --reference=${OldPath}/${CurrentFile} ${NewPath}/${CurrentFile} I'd probably cd to the new copy's path and do the recursive find / glob there to get the file name in a variable. I think that would apply more of the directory traversal walk I/O on the new path and just reference the full path to files in the old path. Quick testing (of globing, namely "**/*") in Zsh makes me think that the following would come close. OldPath="/mnt/old" NewPath="/mnt/new" cd $NewPath for CurrentFile in **/*; do touch --reference=${OldPath}/${NewPath} ${NewPath}/${CurrentFile} done > Will some version of rsync do what I want? Maybe ~> probably. > Thanks for any suggestions, other than to think more carefully before > typing. Mistakes happen. Once you realize how to recover from something, you become less scared of doing it. Save for your time to actually do the recovery.