

"tree" command on MacOSX - evandrix
http://shaunchapman.me/post/329270449/how-to-install-the-tree-command-on-mac-os-x

======
adamt
And this is on the front page?! Apologies for the meta-discussion, but this
highlights go me just how much HN has changed. This tutorial is simply
download, untar, uncomment relevant (and labelled) lines of a makefile and
type make.

~~~
doe88
I think in this case it hit the front page simply because people like me
didn't know this tree command and immediately found it useful. That it be
trivial to install is not the main point I think.

------
joethompson
Or, if you have Homebrew (<http://mxcl.github.com/homebrew/>) installed:

    
    
      brew install tree

~~~
nicholassmith
Amazingly (and the comments on his blog also seem to jump on this), he does
acknowledge that you can do it with a package manager. There's advantages to
learning how to build something like this from source.

~~~
cstuder
Only in this case the learning effect isn't that great, because he doesn't
explain the (to me) most confusing part: Why is the edit of the make file
necessary? Isn't make responsible for choosing the right configuration
settings for the current environment?

~~~
darklajid
No. The usual three step installation from source is

1\. configure

2\. make

3\. sudo make install

Note the absence of 1, which would usually perform these kinds of things
(checking for prerequisites, for example).

------
mathieuh
Useful `tree` aliases:

    
    
        alias l1 'tree --dirsfirst -ChFL 1'
        alias l2 'tree --dirsfirst -ChFL 2'
        alias l3 'tree --dirsfirst -ChFL 3'
        alias l4 'tree --dirsfirst -ChFL 4'
        alias l5 'tree --dirsfirst -ChFL 5'
        alias l6 'tree --dirsfirst -ChFL 6'

------
gbin
Front page !? No offense but it is a brogrammer-class tip to be able to
compile something on a mac...

~~~
gbin
# emerge tree

;)

------
chj
Very good utility. Thanks for the tip.

