[comp.unix.questions] Directory tree tools

ric@ace.sri.com (Richard Steinberger) (02/02/90)

    I received such helpful responses to my query about command line
editing tools that I thought I would ask for suggestions about another
possible Unix tool.  At the moment the only utility I have to sketch out a
directory tree is the following:
-----------------------------------------------------------------
:	# from Unix world, 6/89, p 131
USAGE="Usage: $0 [directory]"
case $# in
	0) ;;
	1) if [ ! -d $1 ]; then
		echo "$1: not a directory" >&2
		echo $USAGE >&2
		exit 1
	   fi ;;
	*) echo $USAGE >&2
	   exit 1 ;;
esac
cd $1
cdir=`pwd`			#save current dir
find . -type d -print |		#locate all directories
sort |				#sort names, present to awk
awk -F/ 'NR == 1 { print "'`basename $cdir`'"}
	 NR >  1 {for (count = 1; count < NF; count++)
			printf "    "		#indent for each dir
			print $NF		#display file name
		}'
--------------------------------------------------------------------

    While this works well enough, i.e., it does draw a picture of a a
directory tree, what would be really nice is a tool that draws the tree,
then highlights the current directory (inverse video perhaps), and allows
the user to navigate to a new directory, rename a directory, move a
directory to a new node on the tree, or delete a directory, using arrow keys
and other keys as appropriate.  Also useful would be the ability to get a
brief listing of the files in the current directory (wherever the user has
traveled to using arrow keys) without leaving the utility.

    Does anyone know of such a utility?  Things like this exist for 
VMS (swing) and for PCs (e.g., xtree), and it would be nice to have
the same capability for unix machines.

    Thanks for any suggestions.  If there is enough interest, I could post
a summary.

regards,

	ric steinberger
	ric@ace.sri.com   or   ric@rml2.sri.com

merlyn@iwarp.intel.com (Randal Schwartz) (02/02/90)

In article <8722@unix.SRI.COM>, ric@ace (Richard Steinberger) writes:
| 
|     I received such helpful responses to my query about command line
| editing tools that I thought I would ask for suggestions about another
| possible Unix tool.  At the moment the only utility I have to sketch out a
| directory tree is the following:
[deleted]
|     While this works well enough, i.e., it does draw a picture of a a
| directory tree, what would be really nice is a tool that draws the tree,
| then highlights the current directory (inverse video perhaps), and allows
| the user to navigate to a new directory, rename a directory, move a
| directory to a new node on the tree, or delete a directory, using arrow keys
| and other keys as appropriate.  Also useful would be the ability to get a
| brief listing of the files in the current directory (wherever the user has
| traveled to using arrow keys) without leaving the utility.

Most Emacs-es have a directory editor built in.  I have a nifty one
that I've been using called "monkey" for GNU emacs that does most of
what you asked for (which I can send you, if you mail me).

Just another Unix hacker,
-- 
/=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\
| on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III      |
| merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn |
\=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/

jbayer@ispi.UUCP (Jonathan Bayer) (02/02/90)

ric@ace.sri.com (Richard Steinberger) writes:


>    I received such helpful responses to my query about command line
>editing tools that I thought I would ask for suggestions about another
>possible Unix tool.  At the moment the only utility I have to sketch out a
>directory tree is the following:


Grab the program "vtree" from the comp.sources.unix archives.  It does most
of what you want (I wrote it, so I should know :-)


JB
-- 
Jonathan Bayer		Intelligent Software Products, Inc.
(201) 245-5922		500 Oakwood Ave.
jbayer@ispi.COM		Roselle Park, NJ   07204