Seeing the forest with tree

In Full View

Article from Issue 163/2014

The tree command can provide a clear view of all your files and directories and offers a few advantages over the usual ls command.

The tree command [1] is a tool that I'd overlooked until recently. After trying it for several weeks, however, I am starting to prefer its tree-like display of directories and files to the plain lists generated by ls.

Part of the reason is that, in these GUI-oriented days, even a directory tree made with ASCII characters is more comfortable than no structural display at all. The functional differences between tree and ls are minimal. The two commands share a few options, such as -a for displaying all files, and even when the options are different, the functionality remains similar. The largest exception I have noticed is that ls offers an option for the number of columns in which to display results; the tree display makes a single column unavoidable.

You have to look closely to see the differences, but tree is consistently more versatile, starting with, unlike ls, recursion. By default, tree displays all files in all subdirectories.


Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Workspace: TreeLine

    The hybrid nature of TreeLine means it offers more than your typical information manager. An outliner as well as a database, it allows you to sort and store all kinds of data with ease.

  • Agedu

    Agedu helps you clean up your hard drive by identifying old files. Free up wasted space instead of creating wasted time.

  • File Management

    We give you an overview of commands for moving, editing, compressing, and generally manipulating files.

  • File Management

    We give you an overview of commands for moving, editing, compressing, and generally manipulating files.

  • Cmdfs

    Cmdfs builds a filtered virtual filesystem based on a source directory tree. You can even integrate other programs to convert data on the fly.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95


njobs Europe
Njobs Netherlands Njobs Deutschland Njobs United Kingdom Njobs Italia Njobs France Njobs Espana Njobs Poland
Njobs Austria Njobs Denmark Njobs Belgium Njobs Czech Republic Njobs Mexico Njobs India Njobs Colombia