zoukankan      html  css  js  c++  java
  • 命令

    ls 命令

    使用及参数

     ls [-alrtAFR] [name...]
    -a 显示所有文件及目录 (ls内定将文件名或目录名称开头为"."的视为隐藏档,不会列出)
    -l 除文件名称外,亦将文件型态、权限、拥有者、文件大小等资讯详细列出
    -r 将文件以相反次序显示(原定依英文字母次序)
    -t 将文件依建立时间之先后次序列出
    -A 同 -a ,但不列出 "." (目前目录) 及 ".." (父目录)
    -F 在列出的文件名称后加一符号;例如可执行档则加 "*", 目录则加 "/"
    -R 若目录下有文件,则以下之文件亦皆依序列出
    
    [chenxi188@centos-7 ~]$ pwd
    /home/chenxi188
    [chenxi188@centos-7 ~]$ ls -a
    .              .bash_profile  .dbus      .esd_auth      Pictures
    ..             .bashrc        Desktop    .ICEauthority  Public
    .bash_history  .cache         Documents  .local         Templates
    .bash_logout   .config        Downloads  Music          Videos
    [chenxi188@centos-7 ~]$ ls -l
    总用量 0
    drwxr-xr-x. 2 chenxi188 chenxi188 6 3月  26 16:13 Desktop
    drwxr-xr-x. 2 chenxi188 chenxi188 6 3月  26 2020 Documents
    drwxr-xr-x. 2 chenxi188 chenxi188 6 3月  26 2020 Downloads
    drwxr-xr-x. 2 chenxi188 chenxi188 6 3月  26 2020 Music
    drwxr-xr-x. 2 chenxi188 chenxi188 6 3月  26 2020 Pictures
    drwxr-xr-x. 2 chenxi188 chenxi188 6 3月  26 2020 Public
    drwxr-xr-x. 2 chenxi188 chenxi188 6 3月  26 2020 Templates
    drwxr-xr-x. 2 chenxi188 chenxi188 6 3月  26 2020 Videos
    [chenxi188@centos-7 ~]$ ls -la
    总用量 36
    drwx------. 14 chenxi188 chenxi188 4096 3月  26 16:20 .
    drwxr-xr-x.  3 root      root        23 3月  26 2020 ..
    -rw-------.  1 chenxi188 chenxi188  371 3月  26 16:17 .bash_history
    -rw-r--r--.  1 chenxi188 chenxi188   18 8月   8 2019 .bash_logout
    -rw-r--r--.  1 chenxi188 chenxi188  193 8月   8 2019 .bash_profile
    -rw-r--r--.  1 chenxi188 chenxi188  231 8月   8 2019 .bashrc
    drwx------. 18 chenxi188 chenxi188 4096 3月  26 15:58 .cache
    drwxr-xr-x. 17 chenxi188 chenxi188 4096 3月  26 15:58 .config
    drwx------.  3 chenxi188 chenxi188   25 3月  26 2020 .dbus
    drwxr-xr-x.  2 chenxi188 chenxi188    6 3月  26 16:13 Desktop
    drwxr-xr-x.  2 chenxi188 chenxi188    6 3月  26 2020 Documents
    drwxr-xr-x.  2 chenxi188 chenxi188    6 3月  26 2020 Downloads
    -rw-------.  1 chenxi188 chenxi188   16 3月  26 2020 .esd_auth
    -rw-------.  1 chenxi188 chenxi188  930 3月  26 16:20 .ICEauthority
    drwx------.  3 chenxi188 chenxi188   19 3月  26 2020 .local
    drwxr-xr-x.  2 chenxi188 chenxi188    6 3月  26 2020 Music
    drwxr-xr-x.  2 chenxi188 chenxi188    6 3月  26 2020 Pictures
    drwxr-xr-x.  2 chenxi188 chenxi188    6 3月  26 2020 Public
    drwxr-xr-x.  2 chenxi188 chenxi188    6 3月  26 2020 Templates
    drwxr-xr-x.  2 chenxi188 chenxi188    6 3月  26 2020 Videos
    
    [chenxi188@centos-7 ~]$ ls -ld
    drwx------. 14 chenxi188 chenxi188 4096 3月  26 16:20 .
    
    
    $ ls -la /home
    总用量 4
    drwxr-xr-x.  3 root      root        23 3月  26 2020 .
    dr-xr-xr-x. 17 root      root       224 3月  26 2020 ..
    drwx------. 14 chenxi188 chenxi188 4096 3月  26 16:20 chenxi188
    
    

    蓝色—目录
    绿色—可执行文件
    红色—压缩文件
    浅蓝色—链接文件
    粉红色—图片文件
    黄色—设备文件
    灰色—其他文件

  • 相关阅读:
    用 Python 带你看各国 GDP 变迁
    Fluent Interface(流式接口)
    probing privatePath如何作用于ASP.NET MVC View
    Word插入htm文件导致文本域动态增加的一个问题
    Visual Studio 2013附加进程调试IE加载的ActiveX Control无效解决方法
    Ubuntu下Chrome运行Silverlight程序
    Windows Phone Bing lock screen doesn't change解决方法
    SPClaimsUtility.AuthenticateFormsUser的证书验证问题
    Web Service Client使用Microsoft WSE 2.0
    Visual Studio 2013安装Update 3启动crash的解决方法
  • 原文地址:https://www.cnblogs.com/chenxi188/p/12575379.html
Copyright © 2011-2022 走看看