zoukankan      html  css  js  c++  java
  • ⑤linux基础命令 tree

    以树状的结构显示目录和文件
    [root@rstx-201 ~]# tree
    .
    ├── anaconda-ks.cfg
    ├── test
    └── test2
        ├── 1
        └── 2
    4 directories, 1 file  #显示文件和目录的数量
    
    tail -L 查看目录层数
    [root@rstx-53 ~]# tree -L 1
    .
    ├── anaconda-ks.cfg
    ├── c2p.zip
    ├── Californium.properties
    ├── cfssljson_linux-amd64
    
    [root@rstx-53 ~]# tree -L 2
    .
    ├── anaconda-ks.cfg
    ├── c2p.zip
    ├── Californium.properties
    ├── cfssljson_linux-amd64
    ├── httpd
    │   ├── Dockerfile
    │   ├── index.html
    │   ├── nginx-1.19.3.tar.gz
    │   └── yum.repos.d
    ├── jenkins
    │   ├── config.xml
    
    tail -d 只查看目录
    [root@rstx-53 ~]# tree -L 2 -d
    .
    ├── httpd
    │   └── yum.repos.d
    ├── jenkins
    │   ├── jobs
    │   ├── logs
    │   ├── nodes
    │   ├── plugins
    │   ├── secrets
    │   ├── updates
    │   ├── userContent
    │   ├── users
    │   └── war
    
    tail -f 只查看文件
    [root@rstx-53 ~]# tree -L 2 -f
    .
    ├── ./anaconda-ks.cfg
    ├── ./c2p.zip
    ├── ./Californium.properties
    ├── ./cfssljson_linux-amd64
    ├── ./httpd
    │   ├── ./httpd/Dockerfile
    │   ├── ./httpd/index.html
    │   ├── ./httpd/nginx-1.19.3.tar.gz
    │   └── ./httpd/yum.repos.d
    ├── ./jenkins
    │   ├── ./jenkins/config.xml
    │   ├── ./jenkins/copy_reference_file.log
    │   ├── ./jenkins/hudson.model.UpdateCenter.xml
    │   ├── ./jenkins/identity.key.enc
    │   ├── ./jenkins/jenkins.install.UpgradeWizard.state
    │   ├── ./jenkins/jenkins.telemetry.Correlator.xml
    │   ├── ./jenkins/jobs
    
  • 相关阅读:
    C#调用Halcon
    C#跨窗体程序调用方法的具体操作
    C#调用DLL报错:试图加载格式不正确的程序
    C#窗体程序设置禁用关闭按钮
    C#窗体程序设置禁用关闭按钮
    C#在字符串中查询指定字符串是否存在
    poj1654
    poj1873
    poj2451
    poj1113
  • 原文地址:https://www.cnblogs.com/yangtao416/p/14451757.html
Copyright © 2011-2022 走看看