LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 894|回复: 2

请问大家一个autofs的问题

[复制链接]
发表于 2005-1-10 14:04:11 | 显示全部楼层 |阅读模式
机器1(10.10.70.18):
[root@example /]# cat /etc/exports
/t      10.10.70.19(sync,rw,no_root_squash)
[root@example /]# service nfs restart
Shutting down NFS mountd: [  OK  ]
Shutting down NFS daemon: [  OK  ]
Shutting down NFS quotas: [  OK  ]
Shutting down NFS services:  [  OK  ]
Starting NFS services:  [  OK  ]
Starting NFS quotas: [  OK  ]
Starting NFS daemon: [  OK  ]
Starting NFS mountd: [  OK  ]
[root@example /]# service portmap restart
Stopping portmapper: [  OK  ]
Starting portmapper: [  OK  ]
[root@example /]# ll /t
total 4
-rwxrwxrwx    1 root     root            5 Jan 10 14:02 txt
[root@example /]# cat /t/txt
haha
机器2(10.10.70.19):
[root@example /]# cat /etc/auto.master
/tt     /etc/auto.tt
[root@example /]# cat /etc/auto.tt
*       -fstype=nfs,rw,intr,soft        10.10.70.18:/t
[root@example /]# service autofs restart
Stopping automount:[  OK  ]
Starting automount:[  OK  ]
[root@example /]# ll /tt
total 0
[root@example /]# ll /tt/txt
total 4
-rwxrwxrwx    1 root     root            4 Jan 10 11:26 txt
[root@example /]# cat /tt/txt
cat: /tt/txt: Is a directory
问题:机器1上的txt是个文件,可在机器2上怎么提示是个目录呢?而且不能cat.ll /tt也不能看到这个文件.
发表于 2005-1-10 14:12:34 | 显示全部楼层
cat  /tt/txt 是mount  10.10.70.18:/t  /tt/txt  ; cat /tt/txt 当然是 dirctory ! 你ll /tt/txt 看的是dirctory txt 中的文件!
要 cat /tt/*/txt  ,* 代表任意字符或字符串!
 楼主| 发表于 2005-1-10 14:37:44 | 显示全部楼层
谢谢老师!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表