View previous topic :: View next topic |
Author |
Message |
sram n00b
Joined: 27 Mar 2004 Posts: 45
|
Posted: Mon Feb 27, 2006 3:37 am Post subject: soft link and mounting with bind option |
|
|
What is the difference between these two. mainly from their usage point of view and if you could, implementation also.
thanx in advance |
|
Back to top |
|
|
platojones Veteran
Joined: 23 Oct 2002 Posts: 1602 Location: Just over the horizon
|
Posted: Mon Feb 27, 2006 8:04 am Post subject: |
|
|
With a bind mount, a filesystem (or part of a file system) can be mounted in multiple places. A soft (or symbolic) link simply creates a reference to another file or directory. I don't really know what you have in mind, but the main difference would be how they are managed: with ln or with mount. In practice, they seem to accomplish much the same thing. I don't think a bind mount can mount a standard file, for instance, but you can create a soft link to one. From a management standpoint, mounts are globally visible and can be managed through fstab, where links are local to their locations. Another consideration would be if you wanted to detect a soft link. Many standard utilities take soft links into account (such as cp and tar, which can discriminate between a soft link and a real directory and act according to the flags you've set). Here's a good article on bind mounts, btw:
http://www-128.ibm.com/developerworks/library/l-fs3.html#g01 |
|
Back to top |
|
|
nephros Advocate
Joined: 07 Feb 2003 Posts: 2139 Location: Graz, Austria (Europe - no kangaroos.)
|
Posted: Tue Mar 21, 2006 7:26 pm Post subject: |
|
|
platojones wrote: | I don't think a bind mount can mount a standard file, for instance, but you can create a soft link to one. |
Actually you can.
From man mount:
Quote: | Since Linux 2.4.0 it is possible to remount part of the file hierarchy somewhere
else. The call is
mount --bind olddir newdir
After this call the same contents is accessible in two places. One can also
remount a single file (on a single file).
|
_________________ Please put [SOLVED] in your topic if you are a moron. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|