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
    
  • 相关阅读:
    NGUI本地化
    Unity中的特殊文件夹
    NGUI3.7.4实现循环拖动
    一年
    倒计时 功能
    PV inverter启动 ----系列二
    关于几个其他的命令使用 【实时更新】
    QT学习系列-----5 --Qt 4.8.5的移植
    QT学习系列-----4 --Qt 版本及qwt
    经典数字信号处理图书的个人评述【转】
  • 原文地址:https://www.cnblogs.com/yangtao416/p/14451757.html
Copyright © 2011-2022 走看看