1833144 Members
2922 Online
110051 Solutions
New Discussion

Error in link creation

 
SOLVED
Go to solution
hboo
Frequent Advisor

Error in link creation

Hello all

I want create a link between a existing file (file1) and new file (file2), executing next command:

ln file1 /dir/subdir/file2

The output is:

ln: different file system

I tried ln -f and output is the same.
Somebody can help me please...

Thnak's
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Error in link creation

You are attempting to create a hard-link (which is two or more directory entries sharing a common inode and must therefore be in the same file system). Instead you want a "soft" or symbolic link which is a directory-entry that contains a string is, in fact, another directory entry and can cross file system boundaries.

Add the "-s" argument to your existing ln and you are good to go.

ln -s file1 /dir/subdir/file2
If it ain't broke, I can fix that.
hboo
Frequent Advisor

Re: Error in link creation

Thank´s ..

Its works good.

Bye
hboo
Frequent Advisor

Re: Error in link creation

Thank's