码迷,mamicode.com
首页 > 系统相关 > 详细

linux[基础]-07-常用命令[01]

时间:2017-08-15 10:02:22      阅读:160      评论:0      收藏:0      [点我收藏+]

标签:pwd   str   order   家目录   border   username   其他   span   ls -l   

显示当且工作路径和切换

 1.       Pwd :命令用于显示当前工作路径

    Pwd  显示当前工作路径

    Pwd  – p  显示真实路径

 2.       cd: 切换工作路径

cd – 切换上一次的工作路径

cd ~ 切换到家目录

cd .. 切换到上级目录

cd ~username 切换到其他用户的家目录

3.       ls:查看当前目录有哪些文件

    格式为:ls [选项] [文件]

          

参数

作用

-a

查看全部文件

-d

仅看目录本身

-l

显示文件的详细的信息

-h

易读的文件容量(k,m,g

        

         [root@Msl23-linux ~]# ls -ld /etc

  drwxr-xr-x. 132 root root 8192 Aug 15 08:20 /etc

 

  [root@Msl23-linux ~]# ls -dhl /etc

  drwxr-xr-x. 132 root root 8.0K Aug 15 08:20 /etc

 

  [root@Msl23-linux ~]# ls -al

  total 60

  dr-xr-x---. 14 root root 4096 Aug 15 08:07 .

  drwxr-xr-x. 17 root root 4096 Aug 15  2017 ..

  -rw-------.  1 root root 1102 Aug  6 21:17 anaconda-ks.cfg

 

linux[基础]-07-常用命令[01]

标签:pwd   str   order   家目录   border   username   其他   span   ls -l   

原文地址:http://www.cnblogs.com/msl23/p/7363158.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!