Tip: Produce an easy readable file system tree on Linux

You have a number of nested folders and want to see a view in a tree style format.  Try this alias (BASH only)

$ alias filetree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'"
$ filetree

Hope it helps at least one of you !

Leave a Reply

Your email address will not be published. Required fields are marked *