Looking for an alternative to Tree
by iammike2 from LinuxQuestions.org on (#4SJY8)
On my Distro (Synology DSM) there is no TREE command.
I am now using this
Code:find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
to create a Tree of some sorts. It works oke, but the major issue is that filename / dir names are all over the places
for example dir1, dir2 dir 3, dir4, dir 5
first you get
dir3
-file4 dir 3
-file2 dir3
-file1 dir3
then
dir 5 etc etc
Does anybody know a better way to do this where the filenames and dirs are in alphabetical order ???
Thx in advance, greatly appreciated


I am now using this
Code:find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
to create a Tree of some sorts. It works oke, but the major issue is that filename / dir names are all over the places
for example dir1, dir2 dir 3, dir4, dir 5
first you get
dir3
-file4 dir 3
-file2 dir3
-file1 dir3
then
dir 5 etc etc
Does anybody know a better way to do this where the filenames and dirs are in alphabetical order ???
Thx in advance, greatly appreciated