[OT] how to delete 'hardlink'

  • Thread starter Thread starter Lloyd Dupont
  • Start date Start date
L

Lloyd Dupont

I have installed Cygwin on my computeer and I know try to delete it.
Some file can't be deleted!
They could be renamed, moved but can't be deleted.
They aere kind of hardlink.
Any idea which command I should use to get rid of them?
 
Thanks!

Mhh.. this .lnk files seems to be something else entirely...
I can't remove the readonly tag whasoever!
 
Lloyd said:
Thanks!

Mhh.. this .lnk files seems to be something else entirely...
I can't remove the readonly tag whasoever!

How are you doing it, and what is the error? Have you tried Windows
Explorer or the command line? Have you tried with the administrator's
account? What is the ACL on the file? Have you tried taking ownership?
It might be that some other process has a lock on the file, sysinternals
has a tool to tell you if this is the case. Usually if you can rename a
file, but cannot delete the file it often means the file is locked by
another process. I usually rename the file to have the extension
..deleteme and then try to remember to delete it after the next reboot
(post-it notes help here <g>).

Richard
 
How are you doing it, and what is the error? Have you tried Windows
with windows explorer I get
========
---------------------------
Error Deleting File or Folder
---------------------------
Cannot delete 02: Access is denied.

Make sure the disk is not full or write-protected
and that the file is not currently in use.
---------------------------
OK
---------------------------
========

(it's named 02, because I have moved & renamed them c:\cygwin-crap\01 to
cygwin-crap\16)
(Also: they are readonly, but I can't remove the readonly tag)

Explorer or the command line? Have you tried with the administrator's
with the command line I have:
C:\cygwin-crap>del 01.lnk
C:\cygwin-crap\01.lnk
Access is denied.
I am logged as administrator. yeah I know, ahum.....
What is the ACL on the file?
I have heard about ACL but have no idea what they are pratically speaking.
Have you tried taking ownership?
mmhh.. I don't have a security tab...
Attrib +/-r doesn't work (access denied)
It might be that some other process has a lock on the file, sysinternals
using processXplorer, no one reference these files
has a tool to tell you if this is the case. Usually if you can rename a
file, but cannot delete the file it often means the file is locked by
another process. I usually rename the file to have the extension .deleteme
and then try to remember to delete it after the next reboot (post-it notes
help here <g>).
I did reboot a few times since they have been renamed, I still cannot delete
them.

Console.WriteLine(File.GetAttributes(arg[0]));
gives me:
ReadOnly, Archive


property (with explorer) on these file gives me:
Type of File: Shortcut
Target: (i.e.: none)
ReadOnly
Comment: ../../i686-pc0cygwin/3/2/cc1.exe
 
Back
Top