bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27538: ln -s creating broken sym link?


From: Bernhard Voelker
Subject: bug#27538: ln -s creating broken sym link?
Date: Fri, 30 Jun 2017 16:54:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

tag 27538 notabug
close 27538
stop

On 06/30/2017 02:58 PM, Jonny Grant wrote:
> Hello
> 
> Managed to create a broken link, but didn't get any warning.

Why would you expect to get a warning?  Symlink links are just like
that - they are soft, loose or whatever you may call them.  The target
does not have to exist.  Some people or software even use them to
store little pieces of data in the target name of symbolic links;
IIRC e.g. the old netscape did that to store the PID of the process
like 'pid' -> 'localhost:12345'.

> Example below - am I miss-understanding something?
> 
> $ mkdir mydir
> 
> $ ln -s sym mydir

yes, you told ln(1) to create a symlink to 'sym', and as 'mydir'
was an existing directory, the basename of the symlink is also
'sym', and the link is created in the directory.

Please consider using additional options like -n, -v, -f or others
to get results closer to your expectations.

> $ cd mydir
> 
> $ ls -l
> 
> total 0
> 
> lrwxrwxrwx 1 jonny jonny 3 Jun 27 11:02 sym -> sym

Therefore, ln(1) works as expected, and there's not much we can do
about it.  Thus, I'm hereby marking this as NOT-A-BUG and I'm closing
this issue in our bug tracker, but you may of course continue the
discussion by replying to this.

Have a nice day,
Berny





reply via email to

[Prev in Thread] Current Thread [Next in Thread]