Skip to content

Instantly share code, notes, and snippets.

@matthewsimo
Last active December 27, 2015 13:59
Show Gist options
  • Select an option

  • Save matthewsimo/7337404 to your computer and use it in GitHub Desktop.

Select an option

Save matthewsimo/7337404 to your computer and use it in GitHub Desktop.
Tree bash command
# Accepts a path, defaults to .
function tree {
local dir=${1:-.};
find $dir -print | sed -e 's;[^/]*/;|--;g;s;--|; |;g';
}
#
# Just add this into a file in your path, .bashrc for example.
#
@matthewsimo
Copy link
Copy Markdown
Author

Example output looks like:

tree output

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