anyone made a 'vtree' program?

Bill Irwin bill at twg.bc.ca
Fri Jan 18 18:12:28 AEST 1991


datta at vacs.uwp.wisc.edu (David Datta) writes:

>Has anyone made a program or script for UNIX that does a "visual tree"
>similar to the MSDOS program 'vtree' and the MSDOS V4.X tree programs?

Here  is  a version I picked up off the net a while back, with  a
sample of the output.

--------cut here--------------
:
# Script to print a visual directory tree

Dir=${1-"`pwd`"}
cd $Dir
echo "Vtree of: $Dir"
find $Dir -type d -print | sort -f |
sed -e "s,^${Dir},," -e "/^$/d" -e \
"s,[^/]*/\([^/]*\)$,\`-----\1," -e "s,[^/]*/, |     ,g"
--------cut here--------------

Sample output:

$ cd to/some/directory
$ vtree
Vtree of: /u/sag/source
`-----awf
`-----Backup
`-----bbx
`-----call
`-----chat
`-----cobol-altos386
`-----du-new
`-----filter
`-----graphic
`-----ichk
`-----mailcheck
`-----news
 |     `-----compress
 |     `-----cvt
 |     `-----doc
 |     `-----info
 |     `-----man
 |     `-----misc
 |      |     `-----keepnews
 |      |     `-----savenews
 |     `-----newsxd
 |     `-----nn
 |      |     `-----conf
 |      |     `-----contrib
 |      |     `-----doc
 |      |     `-----help
 |      |     `-----inews
 |      |     `-----man
 |     `-----patch
 |      |     `-----patches
 |      |     `-----UU
 |     `-----src
 |     `-----uucp
`-----othello
 |     `-----images
`-----shar
 |     `-----backup
`-----sps
`-----uucp
 |     `-----nuztools
 |     `-----old2new
 |     `-----rnget
 |     `-----uplot
 |     `-----userfile
 |     `-----uu
 |     `-----uucpanz
`-----uugetty
 |     `-----man
`-----uutizo
`-----watch
`-----xmascard
`-----xpd
 |     `-----3.4b
`-----zmodem
-- 
Bill Irwin    -       The Westrheim Group     -    Vancouver, BC, Canada
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
uunet!van-bc!twg!bill     (604) 431-9600 (voice) |     UNIX Systems
bill at twg.bc.ca            (604) 430-4329 (fax)   |     Integration



More information about the Comp.unix.questions mailing list