LoginSignup
1
0

More than 5 years have passed since last update.

[Tips] treeコマンドを使ってディレクトリ構造を出力する

Posted at

やり方

1. treeコマンドをインストール

  brew install tree

2. あとは叩くだけ!簡単

tree 
$ tree .
.
├── dist
│   ├── index.html
│   └── main.js
├── node_modules
│   ├── @webassemblyjs
│   │   ├── ast
│   │   │   ├── LICENSE
│   │   │   ├── README.md
│   │   │   ├── esm
│   │   │   │   ├── clone.js
│   │   │   │   ├── definitions.js
│   │   │   │   ├── index.js
...

(補足) 主なオプション

オプション 説明
-a 不可視ファイルも含めて出力
-d ディレクトリのみ出力
-f フルパスで出力
-i ツリーの枝を表示しない。-fと一緒に使うと便利
-l シンボリックリンクを追跡する
-p ファイルタイプとパーsミッションを付与
-s ファイルサイズを出力する
-h わかりやすくファイルサイズを出力する

もっと知りたい方はドキュメント

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0