terminal commandline at paulcarvill.com, the home of Paul Carvill on the web

link: paulcarvill at flickr

paulcarvill.com

Hi, I'm Paul Carvill and I'm a web developer. I am Head of Interface Development at LBi, Europe's largest digital agency.

I also like walking, cooking, Bollywood and rock 'n' roll.

Posts Tagged ‘terminal commandline’

Tree command for Mac OS X

Saturday, January 16th, 2010

This outputs a structured view of files and folder of the directory you execute it in:

find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'

e.g.

.
|____.git
| |____branches
| |____config
| |____description
| |____HEAD
| |____hooks
| | |____applypatch-msg.sample
| | |____commit-msg.sample
| | |____post-commit.sample
| | |____post-receive.sample
| | |____post-update.sample
| | |____pre-applypatch.sample
| | |____pre-commit.sample
| | |____pre-rebase.sample
| | |____prepare-commit-msg.sample
| | |____update.sample
| |____index
| |____info
| | |____exclude
| |____objects
| | |____info
| | |____pack
| |____refs
| | |____heads
| | |____tags
|____CHANGELOG.txt
|____COPYRIGHT.txt
|____cron.php
|____includes
| |____actions.inc
| |____batch.inc
| |____bootstrap.inc
| |____cache-install.inc
| |____cache.inc
| |____common.inc
| |____database.inc
| |____database.mysql-common.inc
| |____database.mysql.inc
| |____database.mysqli.inc
| |____database.pgsql.inc
| |____file.inc
| |____form.inc
| |____image.gd.inc
| |____image.inc
| |____install.inc
| |____install.mysql.inc
| |____install.mysqli.inc
| |____install.pgsql.inc
...

ls -R does something similar, but structured considerably differently.