GNU bug report logs - #32127
ln: add option to fall-back to softlink if hardlink fails

Previous Next

Package: coreutils;

Reported by: L A Walsh <coreutils <at> tlinx.org>

Date: Wed, 11 Jul 2018 19:30:02 UTC

Severity: wishlist

Full log


Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: L A Walsh <coreutils <at> tlinx.org>
Cc: Coreutils <bug-coreutils <at> gnu.org>, Coreutils <coreutils <at> gnu.org>
Subject: bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do likewise?
Date: Fri, 13 Jul 2018 10:03:52 -0700

-------- Original Message --------
Subject: 	bug#32127: RFE -- in the way "cp -rl" -- enable 'ln' to do 
likewise?
Resent-Date: 	Thu, 12 Jul 2018 07:17:02 +0000
Resent-From: 	L A Walsh <coreutils <at> tlinx.org>
Resent-CC: 	bug-coreutils <at> gnu.org
Date: 	Thu, 12 Jul 2018 00:16:50 -0700
From: 	L A Walsh <coreutils <at> tlinx.org>
To: 	Paul Eggert <eggert <at> cs.ucla.edu>
CC: 	32127 <at> debbugs.gnu.org
References: 	<5B465A80.8030104 <at> tlinx.org> 
<a8b9d013-8886-5b8a-741b-50219255f94a <at> cs.ucla.edu>



Paul Eggert wrote:
> L A Walsh wrote:
>> Like I'll want an "RCS" dir to point to 1 RCS tree -- so I try to use
>> ln <existing RCSdir> <new RCS loc>.  ln, of course seems to think I
>> want the impossible -- and says you can't have hard-linked directories.
> 
> You can use "ln -s" instead of plain "ln". If that's not what you want, then I'm 
> afraid I don't understand what you want, exactly.
---
	Yes, I can retype the command after getting an error telling
me that regular links to directories are invalid.

	I'm asking why does 'ln' bother to tell the user that they are wrong and do nothing useful?  Why not just go ahead and create a symlink -- since it is likely that is what is wanted and is the only type of link that works?

	If needed, it could even tell the user that hard links don't
work so it created a symlink instead.  That way, in the mostly likely case (user wanted a symlink and left off the '-l'), they user would have the symlink created and would not have to re-enter the command.








This bug report was last modified 6 years and 231 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.