'touch filename.ext' will touch 'filename.ext.exe' or 'filename.ext.lnk' or 'filename.ext.exe.lnk' if they exist when there's no 'filename.ext'
Mike Kaganski
mikekaganski@mail.ru
Tue Aug 2 13:45:38 GMT 2022
Hi!
Using cygwin 3.3.4-2 and 3.3.5-1:
Create a file named 'file.ext.exe'.
In cygwin, run:
> touch file.ext
Examine the directory. The 'file.ext' wasn't created; the file
'file.ext.exe' timestamp was updated.
procmon shows this log for a non-existing file access by touch:
> touch.exe 17588 CreateFile D:\Documents\nonexistent.ext NAME
NOT FOUND Desired Access: Read EA, Read Attributes, Read Control,
Disposition: Open, Options: Open Reparse Point, Attributes: n/a,
ShareMode: Read, Write, Delete, AllocationSize: n/a
"C:\cygwin64\bin\touch.exe"
> touch.exe 17588 CreateFile D:\Documents\nonexistent.ext.exe
NAME NOT FOUND Desired Access: Read EA, Read Attributes, Read
Control, Disposition: Open, Options: Open Reparse Point, Attributes:
n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
"C:\cygwin64\bin\touch.exe"
> touch.exe 17588 CreateFile D:\Documents\nonexistent.ext.lnk
NAME NOT FOUND Desired Access: Read EA, Read Attributes, Read
Control, Disposition: Open, Options: Open Reparse Point, Attributes:
n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
"C:\cygwin64\bin\touch.exe"
> touch.exe 17588 CreateFile
D:\Documents\nonexistent.ext.exe.lnk NAME NOT FOUND Desired
Access: Read EA, Read Attributes, Read Control, Disposition: Open,
Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write,
Delete, AllocationSize: n/a "C:\cygwin64\bin\touch.exe"
> touch.exe 17588 CreateFile D:\Documents\nonexistent.ext
SUCCESS Desired Access: Generic Write, Read Attributes, Disposition:
OpenIf, Options: Synchronous IO Non-Alert, Attributes: N, ShareMode:
Read, Write, Delete, AllocationSize: 0, OpenResult: Created
"C:\cygwin64\bin\touch.exe"
> ...
Using Windows 10 version 21H2 (OS Build 19044.1826)
--
Best regards,
Mike Kaganski
More information about the Cygwin
mailing list