Search This Blog

Thursday, July 14, 2011

List a complete directory tree

List a complete directory tree

You can use the tree command. If tree command does not exist in your system use the following

find . -type d -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'

Reference: http://www.unix.com/shell-programming-scripting/20702-tree-unix.html