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
    
  • 相关阅读:
    选择高性能NoSQL数据库的5个步骤
    如何将 Redis 用于微服务通信的事件存储
    让你的AI模型尽可能的靠近数据源
    Collections.sort 给集合排序
    Bootstrap 文件上传插件File Input的使用
    select2 api参数的文档
    textarea 标签换行及靠左
    JSON
    JDK的get请求方式
    通讯录作业
  • 原文地址:https://www.cnblogs.com/yangtao416/p/14451757.html
Copyright © 2011-2022 走看看