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
    改行去放羊
  • 相关阅读:
    odoo邮箱系统
    运行odoo13,走的odoo12的数据库
    字段`in_group_69`不存在
    odoo库存
    Codeforces 1430E
    AtCoder "Regular Contest 102" D
    AtCoder "Grand Contest 041" E
    ZJNU 2471
    ZJNU 2455
    Codeforces 1426F
  • 原文地址:https://www.cnblogs.com/musen/p/6855349.html
Copyright © 2011-2022 走看看