[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: improvement for 'ln' to add the '-m' switch
From: |
aotto |
Subject: |
Re: improvement for 'ln' to add the '-m' switch |
Date: |
Fri, 9 Feb 2024 09:22:20 +0100 |
User-agent: |
Mozilla Thunderbird |
Hi,
thanks for your answer.
I understand your concern because from a technical point of view a "link" and
"mount" is something total different
*but* from an end-user point of view the end-user want to have the "srcDir" mapped (I use
"mapped" because I want *not*
use the term "link" or "mount") into the "tgtDir" because the end-user
*require* this.
for my special case the "ln -s .." is even don't work with git and so I was
left scan the internet for such a simple task.
the classic "mount" feature does even *not* fit because, as you mentioned also,
the mount does *not* survive a reboot.
I came up with the "ln -m ..." purpose because this is the end-user front-end for
"mapping" a directory/file into an other place.
I understand that this is *not* easy because to survive a reboot without "spam" the "/etc/fstab" definitely require a new
technology.
mfg
aotto
On 09.02.24 09:10, Bernhard Voelker wrote:
[+coreutils ML]
On 2/8/24 17:43, aotto wrote:
> Hi, I write to you because of a suggestion from the "https://serverfault.com/"
Q&A side
you sent this to my personal email, so you're lucky this didn't land in spam.
Hence I'm hereby forwarding to the coreutils mailing list.
> subtract: add a "-m" switch to "ln" to support "mount -bind srcDir tgtDir"
>
> As reference please read:
>
> →
https://serverfault.com/questions/1153146/improvement-add-new-switch-to-ln-called-m-to-link-a-directory-as-mount
>
> As original reference please read:
>
> →
https://stackoverflow.com/questions/77954023/git-check-in-a-file-in-a-symlink-directory-fails/77960139#77960139
>
>
> mfg
>
> aotto
ln(1) is the userland tool for the link/linkat system calls for hard links
and for the symlink/synlinkat system calls for symbolic aka soft links.
Both hard and soft links are persisted in the file system.
mount(1)-ing is a completely different matter, because it tells the kernel
to well, mount(2), one file system (or part of it) on another place, and
this is gone when the system reboots.
Therefore, I don't see any common point in this, and therefore adding such
a functionality to ln(1) is the wrong thing to do.
Have a nice day,
Berny