您的位置:首页 > 运维架构 > Shell

shell里面的一些条件判断

2010-09-08 15:11 295 查看
cd

命令说明:切换进入指定目录使用方式:cd [dirName]cd [相对路径或绝对路径].代表此层目录..代表上层目录-代表前一个工作目录~代表“目前用户身份”所在的主文件夹命令实践:[root@yubinghost ~]# cd /home/yubing 绝对路径[root@yubinghost yubing]# cd. #cd后没有加空格,出现错误-bash: cd.: command not found[root@yubinghost yubing]# cd .[root@yubinghost yubing]# cd .. 目前目录位置的上一层目录[root@yubinghost home]# cd - 去到前一个工作目录/home/yubing[root@yubinghost yubing]# cd[root@yubinghost ~]# cd /home/yubing[root@yubinghost yubing]# cd ~ 去到自己的home目录[root@yubing /]# cd /home/yubing [root@yubing yubing]# pwd/home/yubing[root@yubing yubing]# cd ../.. 跳到目前目录的上上两层[root@yubing /]#

本文出自 “天道酬勤” 博客,请务必保留此出处http://yubing208.blog.51cto.com/7132995/1194406
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: