LoginSignup
0
0

More than 5 years have passed since last update.

Macのコンソールでtreeコマンドを使ってディレクトリ構造を出力したい

Posted at

まずはHomebrewがインストールできているかを確認。

コンソールに

$ brew -v

と打ち込むと

Homebrew 1.7.7
Homebrew/homebrew-core (git revision 60d5a; last commit 2018-10-21)

みたいな感じで表示されると思います。
もし、Homebrewが見当たらないってひとがいたら、
MacにHomebrewをインストールする

を確認してみてください。

treeコマンドを使えるようにする

Homebrewが入っているだけだとtreeコマンドは使えないので

$ brew install tree

でコマンドを使用できるようにします。
あとはtreeコマンドを叩けば、ディレクトリ構造が簡単にコピペできます。

$ tree
.
├── images
├── javascripts
└── stylesheets
    └── style.css
0
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
0
0