Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2519656
  • 博文数量: 609
  • 博客积分: 10061
  • 博客等级: 上将
  • 技术积分: 5920
  • 用 户 组: 普通用户
  • 注册时间: 2008-06-25 08:30
文章分类

全部博文(609)

文章存档

2010年(13)

2009年(39)

2008年(558)

我的朋友

分类: LINUX

2010-08-02 08:53:23

mount --bind
 
例子如下:
[root@localhost ftp]# pwd
/var/ftp
[root@localhost ftp]# ll
总计 8
drwxr-xr-x 2 root root 4096 2009-05-13 pub
[root@localhost ftp]# mkdir yum
[root@localhost ftp]# ll
总计 16
drwxr-xr-x 2 root root 4096 2009-05-13 pub
drwxr-xr-x 2 root root 4096 07-24 09:08 yum
[root@localhost ftp]# mount -l
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw) [/boot]
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/hdc on /media/yum type iso9660 (ro) [RHEL/5.4 i386 DVD]
nfsd on /proc/fs/nfsd type nfsd (rw)
/media/yum on /media/yum type none (rw,bind)
/dev/sdb5 on /media/sdb5 type ext3 (rw) [/media/sdb5]

[root@localhost ftp]# ls
pub  yum
[root@localhost ftp]# tree
.
|-- pub
`-- yum
2 directories, 0 files
[root@localhost ftp]# mount --bind /media/yum /var/ftp/yum
[root@localhost ftp]# mount -l
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw) [/boot]
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/hdc on /media/yum type iso9660 (ro) [RHEL/5.4 i386 DVD]
nfsd on /proc/fs/nfsd type nfsd (rw)
/media/yum on /media/yum type none (rw,bind)
/dev/sdb5 on /media/sdb5 type ext3 (rw) [/media/sdb5]
/media/yum on /var/ftp/yum type none (rw,bind)
[root@localhost ftp]# ls
pub  yum
[root@localhost ftp]# cd yum
[root@localhost yum]# ls
Cluster                RELEASE-NOTES-ko.html     RELEASE-NOTES-U4-kn.html
ClusterStorage         RELEASE-NOTES-ml.html     RELEASE-NOTES-U4-ko.html
EULA                   RELEASE-NOTES-mr.html     RELEASE-NOTES-U4-ml.html
eula.en_US             RELEASE-NOTES-or.html     RELEASE-NOTES-U4-mr.html
GPL                    RELEASE-NOTES-pa.html     RELEASE-NOTES-U4-or.html
images                 RELEASE-NOTES-pt_BR.html  RELEASE-NOTES-U4-pa.html
isolinux               RELEASE-NOTES-ru.html     RELEASE-NOTES-U4-pt_BR.html
README-en              RELEASE-NOTES-si.html     RELEASE-NOTES-U4-ru.html
README-en.html         RELEASE-NOTES-ta.html     RELEASE-NOTES-U4-si.html
RELEASE-NOTES-as.html  RELEASE-NOTES-te.html     RELEASE-NOTES-U4-ta.html
RELEASE-NOTES-bn.html  RELEASE-NOTES-U4-as.html  RELEASE-NOTES-U4-te.html
RELEASE-NOTES-de.html  RELEASE-NOTES-U4-bn.html  RELEASE-NOTES-U4-zh_CN.html
RELEASE-NOTES-en       RELEASE-NOTES-U4-de.html  RELEASE-NOTES-U4-zh_TW.html
RELEASE-NOTES-en.html  RELEASE-NOTES-U4-en       RELEASE-NOTES-zh_CN.html
RELEASE-NOTES-es.html  RELEASE-NOTES-U4-en.html  RELEASE-NOTES-zh_TW.html
RELEASE-NOTES-fr.html  RELEASE-NOTES-U4-es.html  RPM-GPG-KEY-redhat-beta
RELEASE-NOTES-gu.html  RELEASE-NOTES-U4-fr.html  RPM-GPG-KEY-redhat-release
RELEASE-NOTES-hi.html  RELEASE-NOTES-U4-gu.html  Server
RELEASE-NOTES-it.html  RELEASE-NOTES-U4-hi.html  TRANS.TBL
RELEASE-NOTES-ja.html  RELEASE-NOTES-U4-it.html  VT
RELEASE-NOTES-kn.html  RELEASE-NOTES-U4-ja.html
[root@localhost yum]#
阅读(1974) | 评论(0) | 转发(0) |
0

上一篇:linux下用GPG命令加密文件的方法(转载)

下一篇:没有了

给主人留下些什么吧!~~