Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
Linux in General => Linux Development & Programming => Topic started by: deep123 on April 29, 2005, 06:54:30 AM
-
Hi,
Is it possible to have a hard link across partitions....
I need to take a data from one partition and write to to another partitions..If any modification of file done in Partition 1 ,it should be immediately reflected in partition2..I came to know hard link might work.... Is there any other way to do that... Kindly suggest me a solution...Thanks in Advance.
-
It is possible, but that partition have to be mounted on your file system and local to your machine.
Alternatively you can use a soft link to the file after mounting it.
-
HI ,
i have mounted the partition and tried for hardlink a file to that partition say
ln /home/deepam/1.c /mnt/mnt/backup/1.c
the partition is mounted on /mnt/mnt/backup.....
but it throws an error saying "Invalid Cross-device link"...
-
Try this
ln -s /home/deepam/1.c /mnt/mnt/backup/1.c
the -s switch makes it a soft link. Hope it works.
Let me know your result.
-
Ya..its works fine for soft link...but when the source file is deleted then backup copy will also get deleted....I have to try for hard link...
Whenever i try for hard link it throws an error "Invalid device terminal"..how to solve it
-
Only that you need immediate reflection in your backup else you could schedule a copy of the desired file(s), Hard links from my knowledge can't achieve what you require.
-
thanks for ur reply :D