Magical Tree Mac OS

Posted on  by

Every so often, I’ll run across something I find useful, and yet I have only the vaguest sense of exactly how it works. Today’s Geeky Friday tip falls into that category—it’s a one-line Terminal command to display the structure (i.e. all the sub-folders) of any given folder.

  1. Inspired by Klimt’s famous mural The Tree of Life, this dreamily illustrated children’s book tells the story of a magical tree whose fruit saves lives.Painted during the artist’s “golden period,” Gustav Klimt’s The Tree of Life has been interpreted in myriad ways. This children’s book deftly incorporates the mysteries and depth of Klimt’s masterpiece into a story for young readers.
  2. Installing ‘tree’ for the Mac Command Line. If you want a little more control over ‘tree’ like the ability to specify a directory, or you just want the exact ‘tree’ equivalent that comes from the unix world, you can use homebrew or macports to install tree directly in macOS and Mac OS X.
  3. MacFamilyTree 9 - Genealogy for Mac Discover and experience your personal family history, explore your origins, your ancestors, and how your family has evolved over the course of time. MacFamilyTree 9 offers you a wide range of options to capture and visualize your family history.

If the network home folder is hosted on a Mac OS X Server file service, and you configured the Active Directory connector to use SMB rather than AFP, you should create the user’s home folder on the Mac OS X server that hosts the home folder before the user logs in for the first time, so that the user has a home folder with the set of standard. Mac OS X launched on March 24, 2001. The 1990s were rough for Apple. Until 1997, when Steve Jobs took the helm again, the company attempted to right itself by creating a plethora of CE products.

Magical Tree Mac OS

There are many ways to get this information in the Finder (or via third-party programs), but I’ve found it useful when remotely connecting to other Macs, or when I want a quick reminder of a folder’s structure while working in Terminal.

The command outputs an indented list showing all the sub-folders within the current folder, and it does so very quickly, even on large folders.

Magical Tree Mac OS

Here’s the command:

To use it, simply cd into the directory whose structure you’d like to see, then run the command. If you use it a lot, you might want to put it in your user’s .bash_profile file as an alias—just prefix the above command with alias mytree=”, and then add the closing double-quote ( ) at the end. Save the file, and the next time you open a Terminal window, you’ll be able to simply type mytree to see the tree structure. Here’s an example of the output it creates:

As I noted in the intro, I can’t tell you exactly how this works, because I really don’t know myself. It relies heavily on sed, a Unix program that can transform text in a multitude of ways ( man sed will give you a brief overview of its capabilities). I do know that the first bit, find . -type d, tells the system to find all directories (folders) at or below the current level. After that, though, the magic starts with sed, replacing characters as necessary to create the formatted output.

You can do other things with the output, of course. Append more at the end to have it scroll by one page at a time, for instance. Or append > ~/Desktop/my_folders.txt at the end to send the output to a file on your desktop.

See Full List On Oldschool.runescape.wiki

Although I usually prefer to understand exactly how the Unix commands I use accomplish their tasks, in this case I’ve decided that the usefulness of the command outweighs my desire to become an sed wizard to understand it!