treecommand to illustrate the file and directory layout of the project. I love this little command and use it frequently, but it isn’t very well known so here’s a quick example.
As with most linux command line utilities, it does only one thing and it does it very well. In this case, it shows the file structure. For my work-in-progress project (which handily only has a few files so has fairly short output), it does this:
$ tree . . ├── controllers │ ├── MyController.php │ └── UsersController.php ├── index.php ├── models └── views 3 directories, 3 files
The . that was passed here is the name of the directory to generate the tree for; the dot means to use the current directory. You can also pass switches limiting the depth of the listing, showing full paths to each file or directory, and omitting the indentations – as well as a large number of other options that seem less useful!
I use the tree command to put into blog posts, talk slides, and so on – I think it’s clear and easy to read (especially because the toolchain I’m using for slides at the moment make most screenshots look decidedly chewed!), and also just to remind myself where all the various pieces of a project can be found.