Linux命令--tree

tree

  • tree -C :顏色顯示html

  • tree -f : 顯示文件全路徑node

  • tree -L 2 :只顯示2層app

  • tree -P *.pl :只顯示文件目錄和*.pl的perl文件。code

  • tree -F :顯示目錄後面的\;顯示可執行文件*;功能相似ls -Fhtm

  • tree -I :忽略某個目錄或者文件內容,支持正則blog

    tree -I "node_modules"
    tree -I "node_modules|cache|test_*"
  • tree –help :幫助手冊it

最經常使用

# 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

相關文章
相關標籤/搜索