Jira Courses, Training and Consulting: Sparxsys Trainings
Thanks for coming here, I hope you are enjoying learning here, I have also written some books in case you want to learn a bit more :)
If you need my help with Drupal, Linux, Jira, Scripting, Automation or want to contact me then raise a ticket for me please :) and I will get back to you, promise. At Sparxsys we provide Atlassian consultancy services, reach out to me at ravi at sparxsys dot com

How to get directory tree structure in your Mac terminal?

I bought my first Mac in 2013 but honestly I never used it a lot. I bought it to create a mobile app for a client and then later to watch movies and youtube videos but for the past 2 years I have been using Mac as my main computer and I am by no means an expert on using Mac but everyday I learn something good.

Today I was wondering how can I quickly view the directory structure of a folder. After doing a quick google search I found on utility called tree. Yes simple tree command that you can run on your mac but you need to install it first.

Just type the following command. I am assuming you have brew already on your mac. If not then go to https://brew.sh and download it.

  1. brew install tree

That is it really. Now go ahead and try this command.

  1. $tree
  2. ├── LICENSE
  3. ├── README
  4. ├── pom.xml
  5. └── src
  6.     ├── main
  7.     │   ├── java
  8.     │   │   └── com
  9.     │   │       └── atlassian
  10.     │   │           └── tutorial
  11.     │   │               └── myPlugin
  12.     │   │                   ├── api
  13.     │   │                   │   └── MyPluginComponent.java
  14.     │   │                   └── impl
  15.     │   │                       └── MyPluginComponentImpl.java
  16.     │   └── resources
  17.     │       ├── META-INF
  18.     │       │   └── spring
  19.     │       │       └── plugin-context.xml
  20.     │       ├── atlassian-plugin.xml
  21.     │       ├── css
  22.     │       │   └── myPlugin.css
  23.     │       ├── images
  24.     │       │   ├── pluginIcon.png
  25.     │       │   └── pluginLogo.png
  26.     │       ├── js
  27.     │       │   └── myPlugin.js
  28.     │       └── myPlugin.properties
  29.     └── test
  30.         ├── java
  31.         │   ├── it
  32.         │   │   └── com
  33.         │   │       └── atlassian
  34.         │   │           └── tutorial
  35.         │   │               └── myPlugin
  36.         │   │                   └── MyComponentWiredTest.java
  37.         │   └── ut
  38.         │       └── com
  39.         │           └── atlassian
  40.         │               └── tutorial
  41.         │                   └── myPlugin
  42.         │                       └── MyComponentUnitTest.java
  43.         └── resources
  44.             └── atlassian-plugin.xml

Cool. Isn't it?

Subscribe

* indicates required

Please confirm that you would like to from Sparxsys:

You can unsubscribe at any time by clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices.

Want to contact me?