• ⑤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
    
  • 相关阅读:
    7月23日 R进行层次聚类算法的继续完善
    明天学习的内容
    MySql快速导出为excel文件
    数据挖掘的隐私边界 【转自《中欧商业评论》】
    【转】Data truncation: Truncated incorrect DOUBLE value:Mysql Update时
    7月20日下一步工作
    R对term进行kmeans聚类完整实例(tm包)
    数学之美 系列一 统计语言模型
    7月30日总结
    MathType输入Support 自动分开的问题
  • 原文地址:https://www.cnblogs.com/yangtao416/p/14451757.html
Copyright © 2020-2023  润新知