首页 > 系统服务 > 详细

Linux命令--tree

时间:2018-11-23 12:19:35      阅读:192      评论:0      收藏:0      [点我收藏+]

目录

tree

  • tree -C :颜色显示
  • tree -f : 显示文件全路径
  • tree -L 2 :只显示2层
  • tree -P *.pl :只显示文件目录和*.pl的perl文件。
  • tree -F :显示目录后面的;显示可执行文件*;功能类似ls -F
  • tree -I :忽略某个目录或者文件内容,支持正则

    tree -I "node_modules"
    tree -I "node_modules|cache|test_*"
  • tree –help :帮助手册

最常用

# tree -I "venv|__pycache*|*.pyc" -FCL 3
.
├── app/
│   ├── __init__.py
│   ├── routes.py
│   └── templates/
│       ├── base.html
│       └── index.html
├── config.py
└── microblog.py

带颜色显示2级目录

# tree -FCL 2

技术分享图片

排除显示某个目录

# tree -I "venv" -FCL 2

技术分享图片

Linux命令--tree

原文:https://www.cnblogs.com/xuwei1/p/10006604.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!