delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/07/12/20:37:27

DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 46D0bQoJ2651310
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=ukp0ytLa
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD1B7385DDF8
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1720831044;
bh=jl5gyBfaib5fzmjPUckTau7qe+f52L492ZBsP9efeUo=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=ukp0ytLaEQWanByZxU9MoecL2NYprM5J0DsawopkijZrhhSmLsqN+i8cemx+QOsqG
DyC+XKe9sQECegI+C4rM8cr/OOEJi6qdR/6pCfsfXC0P3aXlNsxGdPQEEYJkoJ1PYW
oU7yuB7JHqZymkf8bmN5TRy+d7U93+fq4cK8jWcQ=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7AC223858433
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7AC223858433
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720831023; cv=none;
b=ShS+ihVA5ptDxiWh3ozohdLb9Kv9VUi3s7Dy90cfkGj2IITv9W68zEW3onmPx8OhRj3G14kIwWy2h6eStrXehU0X44RxzU8v909AEFK9aFnMccTg/LC0p2R9i13GFSlt1wz9wHYK0zFbjq1mz1nzZjpzUNGFS1EIMgaj1NRWGKA=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1720831023; c=relaxed/simple;
bh=CqlDuJWlnmmI3h2VUWVKfqQ1VetcdS/z4YBjYXRlrRE=;
h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From;
b=m5Jv1nfh6BPV159+U7+1ho/4UJOExcXrhIQc6A1z3Wikh4UTf4SWLFjVqZDGE65+pJCMGsf7hDsHmIdPAtI7eNfduui7JYxa+n0O/oY/3rmV0AjmEgFiD6gqNESdV1+RJ1ll1T70mj8GbpxsdotuK9mZ9Td+iZ1WMsICTxVYcYk=
ARC-Authentication-Results: i=1; server2.sourceware.org
X-Authority-Analysis: v=2.4 cv=ce5xrWDM c=1 sm=1 tr=0 ts=6691cc2d
a=DxHlV3/gbUaP7LOF0QAmaA==:117 a=DxHlV3/gbUaP7LOF0QAmaA==:17
a=IkcTkHD0fZMA:10 a=8pif782wAAAA:8 a=tXNp_sQbAAAA:8 a=pWzGhDOwQ7i1VEAWhTEA:9
a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
Message-ID: <04f97132-a755-4117-aa74-797d7b7f397a@Shaw.ca>
Date: Fri, 12 Jul 2024 18:37:00 -0600
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: How to use '$RECYCLE.BIN' to recover files?
To: cygwin AT cygwin DOT com
References: <665b9323-b71b-4cf2-badf-bb82d7b5230b AT TomLegrady DOT com>
<20f87410-ef55-4106-9850-20aee54e0259 AT SystematicSW DOT ab DOT ca>
<CAN0SSYwzhu=4Q+g3Gj1gb6bdJb7TfpqOSdUDsWnvB1KZz7YxZA AT mail DOT gmail DOT com>
Autocrypt: addr=Brian DOT Inglis AT Shaw DOT ca; keydata=
xjMEXopx9BYJKwYBBAHaRw8BAQdAPq8FIaW+Bz7xnfyJ1gHQyf2EZo5sAwSPy/bRAcLeWl/N
I0JyaWFuIEluZ2xpcyA8QnJpYW4uSW5nbGlzQFNoYXcuY2E+wpYEExYIAD4WIQTG63sbl+cr
2nyOuZiKvQKcH1E27wUCXopx9AIbAwUJCWYBgAULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAK
CRCKvQKcH1E276DmAP91Bt8kfJhKHYb9b2sao2fxwJFsl1GlRi516WKI0OkphQEA+ULITsPs
blfzSq+GgI7q4LPfRfTLy4Oo3gorlnhnfgnOOAReinH0EgorBgEEAZdVAQUBAQdAepgIsLwm
GQicfoIBaB9xHp63MQJqVCPbgPzESTg7EEwDAQgHwn0EGBYIACYWIQTG63sbl+cr2nyOuZiK
vQKcH1E27wUCXopx9AIbDAUJCWYBgAAKCRCKvQKcH1E27+zoAP4u2ivMQBAqaMeLOilqRWgy
nV2ATImz1p2v1H5P4kBiDwD3caPK1cxU5lijzuSDCjgtIpgF/avHbjA32fxJdIRwAA==
Organization: Inglis
In-Reply-To: <CAN0SSYwzhu=4Q+g3Gj1gb6bdJb7TfpqOSdUDsWnvB1KZz7YxZA@mail.gmail.com>
X-CMAE-Envelope: MS4xfJRR66urFO2XhafPHTH9xfdsW2HkRjZ00PSEFie+TAkpFRxZwJs/c2cjVyQECYsmVBzNzOsF5fge9wxfr2+gmH+YZNT6O+i8qR8HoO7ZQQ1ZgCC3n86Z
VXwDRZJStAKrl8AO96EMlAEV0FU5+EwpTwfS9UyV1AtJR8LvJDRtgHETxWE8xLvaO2nXugJnQ57fGA==
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 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
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Brian Inglis via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Brian Inglis <Brian DOT Inglis AT Shaw DOT ca>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 46D0bQoJ2651310

On 2024-07-12 15:12, Mark Liam Brown via Cygwin wrote:
> On Fri, Jul 12, 2024 at 7:25 PM Brian Inglis via Cygwin wrote:
>> On 2024-07-12 10:33, Tom Legrady via Cygwin wrote:
>>> Using cygwin on Windows 11, I ran a command that was over-enthusiastic in
>>> deleting files. Now files I would like to have are in the $RECYCLE.BIN, with
>>> names like '$I0BEVIM.pdf'.
>>> How can I restore these files' original name and path?
>> See:
>>          https://en.wikipedia.org/wiki/Trash_(computing)#Microsoft_Windows
>>          https://superuser.com/a/1736690
>> for low level details for Vista onwards: original file or directory hard linked
>> in /proc/cygdrive/D/\$Recycle.Bin/S-1-5-21-*-*-*-UID/\$RXXXXXX.type and metadata
>> saved in /proc/cygdrive/D/\$Recycle.Bin/S-1-5-21-*-*-*-UID/\$IXXXXXX.type where
>> UID is often 1000 or 1001 with personal desktop local accounts, and you only
>> have access to your own, unless elevated as admin, e.g.
>> $ ls -glort /proc/cygdrive/d/\$Recycle.Bin/S-1-5-21-*-*-*-1001/
>> total 3
>> -rwx------+ 1 129 Apr  2  2020  desktop.ini
>> drwxr-xr-x  1   0 Dec 12  2021 '$RVW0RM1'
>> -rw-r--r--+ 1   0 Oct 22  2023 '$RQWOLZK.ini-save'
>> -rwx------+ 1 254 Oct 22  2023 '$IQWOLZK.ini-save'
>> -rwx------+ 1  82 Oct 22  2023 '$IVW0RM1'
>> $ xxd -c8 -g8 /proc/cygdrive/d/\$Recycle.Bin/S-1-5-21-*-*-*-1001/\$IVW0RM1
>> 00000000: 0200000000000000  ........    # header (le)
>> 00000008: 0000000000000000  ........    # file size (le)
>> 00000010: e04bc8060b05da01  .K......    # deleted time (le 100ns Windows)
>> 00000018: 1b00000044003a00  ....D.:.    # path length(le 4) path (4+ UCS-2)
>> 00000020: 5c00760061007200  \.v.a.r.
>> 00000028: 5c00630061006300  \.c.a.c.
>> 00000030: 680065005c007300  h.e.\.s.
>> 00000038: 6500740075007000  e.t.u.p.
>> 00000040: 5c00650074006300  \.e.t.c.
>> 00000048: 5c0070006b006900  \.p.k.i.
>> 00000050: 0000              ..

> I think the question was:
> Does Cygwin have utilities which can restore the files from a script?
> Or how can a user call powershell to do the job?

That was not what the OP asked - he asked how.

Asking in a Cygwin group implies he is looking for a Cygwin solution to a 
problem someone created with Cygwin utilities.

I doubt anyone has bothered, so some background info to do the job is referred 
to, and illustrated somewhat.

The easy Windows answer is open Explorer on your 'Recycle Bin' and select 
'Restore' after selecting all those files deleted by mistake.

-- 
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

-- 
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019