This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ln can't hard link into named directory


On 10/20/2012 12:22 PM, Lawrence Mayer wrote:
> Ln can't hard link into named directory.
> 
> e.g.
> 
> Ln ... TARGET... DIRECTORY (3rd form)
> 
> and
> 
> ln ... -t DIRECTORY TARGET...  (4th form)
> 
> both fail when DIRECTORY is named (but appear to work when DIRECTORY = '.' (current directory))
> 
> returning error message
> 
> 'ln: Cannot create a file when that file already exists.' when TARGET is named file
> 
> or
> 
> 'ln: The filename, directory name, or volume label syntax is incorrect.' when TARGET is '*' (wildcard).

Please show us the actual command line you typed, rather than a
description of it; even better, starting from an empty directory, show
us a sequence of mkdir and touch commands that will get us into the same
state to reproduce the message you are complaining about.  However, I
suspect that this is not a bug in ln, but a misunderstanding on your
part.  Cygwin, like Linux, prohibits the creation of hard links to a
directory, and POSIX permits this restriction.  Just because Solaris
chose to allow hard links to a directory does not make it a good idea.

-- 
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]