Skip to content

Instantly share code, notes, and snippets.

@somada141
Last active August 29, 2015 14:08
Show Gist options
  • Save somada141/76a2cdce187108f5cd76 to your computer and use it in GitHub Desktop.
Save somada141/76a2cdce187108f5cd76 to your computer and use it in GitHub Desktop.
ASCII representation of the current directory structure #shell #os #unix #osx #bash

Firstly, define the tree command as such:

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

The cd to the directory in question and run tree. You should get an output such as this:

.
|____MultiModalSegmentation.ipynb
|____patient_109
| |____mr_T1
| | |____header.ascii
| | |____image.bin
| | |____patient_109_mr_T1.mhd
| |____mr_T2
| | |____header.ascii
| | |____image.bin
| | |____patient_109_mr_T2.mhd
|____patient_109.zip

source: https://coderwall.com/p/owb6eg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment