Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1456202
  • 博文数量: 263
  • 博客积分: 10851
  • 博客等级: 上将
  • 技术积分: 2627
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-26 22:40
文章分类

全部博文(263)

文章存档

2013年(4)

2012年(25)

2011年(33)

2010年(50)

2009年(138)

2008年(13)

分类: LINUX

2010-01-18 18:15:26

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 singlefile).


比如:
# mkdir dir1 dir2
# mount --bind  ./dir1 ./dir2
# mount
/usr/local/app/dir1 on /usr/local/app/dir2 type none (rw,bind)
# touch dir1/test.txt
ls dir1 dir2
发现两个目录都有test.txt了。   这个功能就好似于硬链接/软链接。 应用的场景, 我估计是有一些web服务器或者ftp服务器, 不支持读入到软/硬链接里面去。 
阅读(1236) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~