22 Dec 2008

tree is a command-line utility that displays a graphical (well, ASCII-art) directory tree. I saw Scott Chacon using it in his GitCasts and tried it in Terminal on OS X only to see that it wasn't installed. One quick sudo port install tree with MacPorts later, it was.

It's really useful for getting a quick idea of the state of a folder hierarchy. Highly recommended!

Creative Commons LicenseThe tree article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.

Add Your Comment

Spam Protection by WP-SpamFree

tree

  1. I used to use “tree” quite a bit before I realised that “find ” provides the same visual overview of a directory’s hierarchy, but also allows you to grep and copy-paste the full path of files.

    Nathan de Vries
  2. Hmm…my comment was sanitised unexpectedly. If you call “find” with a directory as the first and only argument, you’ll get a much more useful result.

    Nathan de Vries
  3. Nathan, just used Terminal to “find” a directory — thankyou thankyou thankyou. So simple. So useful. So needed so often for so long. Thank you.

    ardobbs