setting up /home/common for files shared among different Linux is Tumbleweed

I’m having a little trouble with ln -sf…it isn’t forcing the way I imagined it would.

I have a 1 TB nvme drive on my Lenovo T495. There is a Win10 partition (and boot/EFI) that we don’t have to worry about here. There are two partitions, 70 GB each, for MX Linux and TW. MX came first. In order to share data between the two Linux desktops (not worried about Win10 here) I have a third partition for home, with a /common directory for the to-be-shared data.

I put three directories of junk in there, to test. /home/common/Videos, Documents and forum_posts. Then, from a dummy account I created to do this test, test1, I typed

ln -sf /home/common/* ~/

thinking that I’d then find /home/test1/Videos and Documents replaced by symlinks to /home/common/Videos and Documents, and a new /home/test1/forum_posts.

BUT, I only got the last one…the -f flag “refused” to overwrite the existing Videos and Documents sub-directories. When I renamed Videos and Documents in test1 with Old_Videos and Old_Documents…it worked fine…so now I have five directories, or the two old ones and three symlinks to those in common.

What’s up…? why didn’t the -f flag force as it’s supposed?

Many thanks

According to the man pages, “-f” will remove existing files. It does not suggest that it will remove existing directories.

Thanks. I read the man pages, but guess I took the old adage, “in Linux, everything is a file” to heart too much. The fact that “-f” won’t “clobber” existing directories, even empty ones, is comforting, but in this case makes a little extra work. No big deal. Thanks again for clarifying.