zoukankan      html  css  js  c++  java
  • Linux命令学习总结:cd命令

    命令简介:

        该命令用来切换当前目录。cd 是change directory 的缩写

    命令语法:


        cd [-L|-P] [dir]

    使用示例


    1:切换到当前目录的上一级目录

       1: [root@DB-Server sysconfig]# pwd
       2: /etc/sysconfig
       3: [root@DB-Server sysconfig]# cd ..
       4: [root@DB-Server etc]# pwd
       5: /etc

    2:切换到当前目录的上上两层目录

       1: [root@DB-Server etc]# cd sysconfig/ 
       2: [root@DB-Server sysconfig]# pwd 
       3: /etc/sysconfig 
       4: [root@DB-Server sysconfig]# cd ../.. 
       5: [root@DB-Server /]# pwd 
       6: /

    3:切换到用户的宿主目录

       1: [root@DB-Server sysconfig]# pwd
       2: /etc/sysconfig
       3: [root@DB-Server sysconfig]# cd ~
       4: [root@DB-Server ~]# pwd
       5: /root

    4:切换到根目录

       1: [root@DB-Server ~]# cd / 
       2: [root@DB-Server /]# 


    5:切换到某个目录,例如/etc/sysconfig/

       1: [root@DB-Server ~]# cd /etc/sysconfig/

    6: 返回进入当前目录前所在目录

       1: [root@DB-Server ~]# cd /etc/sysconfig/ 
       2: [root@DB-Server sysconfig]# cd - 
       3: /root
  • 相关阅读:
    C语言本身并不提供输入输出语句
    大数据
    kdd cup 论文
    决策树比较
    推荐系统
    geohash
    MySQLdb 安装
    天池大数据比赛
    逻辑回归
    矩阵分解
  • 原文地址:https://www.cnblogs.com/kerrycode/p/3425103.html
Copyright © 2011-2022 走看看