Invisible and unremovable .lnk-file exists (copied by Cygwin), directory cannot be removed

0

I copied a Windows-".lnk-file" using Cygwin from a Windows-source- to a Windows-target-directory.

The copied file does not show up in the target-directory, although the system behaves as if the file exists as soon as I try to apply further copy-, move- or remove-commands onto it.

I can neither list the file in the target-directory by using Cygwin (ls-command) nor by using the usual Windows-Tools ("CMD-Box ls"/"Explorer").

I can also not remove the directory – which is the real nuisance.

I successfully created and afterwards removed a copy of the target-directory (using Windows Explorer). But I cannot remove the target-directory from the partition (Windows-drive). (so copying the directory seems to leave out the invisible file from the copy process).

$ cp source-dir/FVWM.lnk /cygdrive/p/Z-Cygwin3/FVWM.lnk
cp: reguläre Datei '/cygdrive/p/Z-Cygwin3/FVWM.lnk' kann nicht angelegt werden: File exists

$ ls -la /cygdrive/p/Z-Cygwin3/
insgesamt 20
drwxrwx---+ 1 <...>   0  5. Apr 17:33 .
drwxrwx---+ 1 <...>   0  5. Apr 17:28 ..

$ rmdir /cygdrive/p/Z-Cygwin3/
rmdir: konnte '/cygdrive/p/Z-Cygwin3/' nicht entfernen: Directory not empty

$ rm /cygdrive/p/Z-Cygwin/FVWM.lnk
rm: das Entfernen von '/cygdrive/p/Z-Cygwin/FVWM.lnk' ist nicht möglich: No such file or directory

$ rm -rf /cygdrive/p/Z-Cygwin/FVWM.lnk
(no error-output thrown, no success-output)

$ rm -rf /cygdrive/p/Z-Cygwin/
rm: das Entfernen von '/cygdrive/p/Z-Cygwin/' ist nicht möglich: Directory not empty

Windows Explorer does not list the file either. When trying to remove the directory using Windows Explorer, the reaction and result is nil. No error is thrown, but the directory persists to exist.

The result is reproducible, which I learned by mistake, now having two persistent, seemingly empty directories.

Attempts with extension of authorities were of no avail.

Any ideas of how can I get rid of this sticky file/directories?

RGL

Posted 2018-04-05T16:45:43.177

Reputation: 1

Have you tried cmd attrib command to see the original and current file attribute ? – matzeri – 2018-04-06T21:18:09.327

@mat attrib could not list any contents. Problem solved anyway by using Windows Explorer to pass the authorities of the folder to all of its sub-objects. Obviously Cygwin did (does) something awkward to the authorities of the copied files. – RGL – 2018-04-09T10:06:56.167

No answers