On OS X and SunOS, there is no bash tree command.
To build a tree of βdiagramsβ of folders, I use the following instruction:
find . -type d -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
Or is it also for displaying files.
find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
But I need another version that also contains folder permissions. Im pretty lost to add folder right on the right. Does anyone have an idea?
Update: It is possible to print files inside folders and their rights. I am trying to execute this find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g' find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g' find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g' and make a combination with the solution provided by #fedorqui, but the result is not so good.
This is the result obtained using the specified command without permissions.
| | |____src | | | |____cft2exit.c | | | |____cft2exit_AIX | | | |____cft2exit_SUN | | | |____gestidt.c | | | |____gestidt.h | | | |____gestidt.o | | | |____gestidt_AIX | | | |____gestidt_SUN | | | |____gestidt_SunOS | | | |____makefile | | | |____sem.a | | | |____ut_sem.c | | | |____ut_sem.h | | | |____ut_sem.o | |____data | | |____purge.dat | |____lost+found
source share