Bash: список файлов в виде дерева

Можно поставить tree.

А можно выполнить такую команду:

find . -maxdepth 3 | sed 's|[^/]*/|- |g'

Или более красиво (с пайпами в первой колонке):

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

http://stackoverflow.com/questions/3455625/linux-command-to-print-directory-structure-in-the-form-of-a-tree

LEAVE A COMMENT