请问CD的默认路径是那里啊??

[复制链接]
查看11 | 回复4 | 2010-3-1 11:20:05 | 显示全部楼层 |阅读模式
帮忙!!!
回复

使用道具 举报

千问 | 2010-3-1 11:20:05 | 显示全部楼层
There is a environment variable named CDPATH,like the PATH, that the shell will search it and find if it cantains the arguments you typed after the CD command.
回复

使用道具 举报

千问 | 2010-3-1 11:20:05 | 显示全部楼层
简单的说就是shell会从左到右的搜索这个variable,这个variable中的第一个路径就应该是所谓的默认路径,如果你输入的路径根本不在这个CDPATH中,那末你就进不到那个directory。明白了??
回复

使用道具 举报

千问 | 2010-3-1 11:20:05 | 显示全部楼层
cat /etc/passwd
看對應的賬號後面的路徑就知道了
回复

使用道具 举报

千问 | 2010-3-1 11:20:05 | 显示全部楼层
奥!!!多谢多谢!!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行