Thursday, May 29, 2014

Linux Directory Tree

Problem Statement
Print a tree structure showing all the files and directories under the current directory.

Solution
 find ./ | sed -e 's/[^-][^\/]*\//--/g;s/--/ |-/'

No comments:

Post a Comment