Graphical depiction of directory tree 
Author Message
 Graphical depiction of directory tree

I seem to recall discussion in this group about a UNIX tool which
used awk to give a graphical depiction of a directory tree, similar
to DOS's dirtree.

If anybody could tell me more about this, I would greatly appreciate
it.

--
-------------------------------------------------------------------------

Configuration Management Engineer       Tel:   408-764-9496
Fujitsu Network Communications          Fax:   408-764-9365
5200 Patrick Henry Drive,              
Santa Clara, CA 95054
-------------------------------------------------------------------------



Fri, 25 Feb 2000 03:00:00 GMT  
 Graphical depiction of directory tree

Quote:

>I seem to recall discussion in this group about a UNIX tool which
>used awk to give a graphical depiction of a directory tree, similar
>to DOS's dirtree.

I've seen several variations, but this sed-based shell script is the
one I use most often.  I have no idea who originally wrote it.

#!/bin/sh

dir=${1:-.}
(cd $dir ; pwd; echo "|")
find $dir -type d -print | sort -f |
sed -e "s,^$1,," -e "/^$/d" -e "/^\.$/d" -e \
"s,[^/]*/\([^/]*\)$,|-----\1," -e "s,[^/]*/,|     ,g"



Fri, 25 Feb 2000 03:00:00 GMT  
 Graphical depiction of directory tree

                a uk wollery sed site has it in sed

: I seem to recall discussion in this group about a UNIX tool which
: used awk to give a graphical depiction of a directory tree, similar
: to DOS's dirtree.

: If anybody could tell me more about this, I would greatly appreciate
: it.

: --
: -------------------------------------------------------------------------

: Configuration Management Engineer       Tel:   408-764-9496
: Fujitsu Network Communications          Fax:   408-764-9365
: 5200 Patrick Henry Drive,              
: Santa Clara, CA 95054
: -------------------------------------------------------------------------
--
=-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
al aab, seders moderator                                      sed u soon
               it is not zat we do not see the  s o l u t i o n          
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+



Fri, 03 Mar 2000 03:00:00 GMT  
 Graphical depiction of directory tree

It was, I belive, from a Unix monthly of a type. It is very useful one

------------------------
#!/bin/sh
#usage: vtree [-a] [dir]
#*TAG:60412 1:Jun 11 1996:0755:sh.d/vtree:vtree:
[ X$1 = X-a ] && andfiles=ON shift
[ $# = 0 ] && set .

until   shift
        [ $# = 0 ]
do      [ ! $# = 1 ] && echo
        cd $1 || continue
        echo "`pwd`\c"
        du ${andfiles:+-a} | sort +1f | sed \
        -e 's/^\([0-9]*\)       \(.*\)$/\2  (\1)/' \
        -e "s#^$1##" \
        -e 's#[^/]*/\([^/]*\)$#|____\1#' \
        -e 's#[^/]*/#|    #g'
done
exit 0

--
Nathan SIVAPATHAM



Wed, 08 Mar 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Graphical Tree Program

2. Graphical Parse Tree Layout

3. Graphical representation of trees and graphs

4. Graphical representation of trees and graphs

5. graphical proof tree

6. graphical display of call-tree information (SUMMARY)

7. Representing a graphical tree hierarchy

8. Need a directory tree list box

9. directory trees (logging thereof) and recursivity?

10. OODialog Tree view for selecting a directory/folder

11. REXX BEAUTIES: Size of directory tree

12. wanted: REXX program to delete a directory tree

 

 
Powered by phpBB® Forum Software