RE: Display unix directory hierarchy

2003-12-26 Thread Stephen.Lee
It suddenly popped into my head a couple days ago that there could be a problem with the script (isn't it crazy what the subconscious mind does?). Note that when it cd's to a new directory, it ASS-U-MEs that it can do that; and then it calls the script again. I haven't verified if for sure

RE: Display unix directory hierarchy

2003-12-23 Thread Mark Leith
Hi Barb, You can use tree/dtree to do this. Windows also has a tree dos command to do the same. HTH Mark -Original Message- Barbara Baker Sent: 23 December 2003 08:49 To: Multiple recipients of list ORACLE-L Hi, listers. As documentation for a project, I would like to display some

RE: Display unix directory hierarchy

2003-12-23 Thread Seibert, Jason
Barbara, You might try tossing the following snippet in a shell script. I call it dtree and you can pass a parameter of a directory. === snip D=${1:-`pwd`} (cd $D; pwd) find $D -type d -print | sort | sed -e s,^$D,,\ -e /^$/d\ -e s,[^/]*/\([^/]*\)$,\:-\1,\ -e s,[^/]*/,:

RE: Display unix directory hierarchy

2003-12-23 Thread Bellow, Bambi
Here's a freebie... Bambi. = #!/bin/ksh LEVEL=1 INCREMENT=FALSE ls -lR|grep -v ^total|while read i do echo $i|grep ^d /dev/null 2/dev/null if [ $? -eq 0 ] ; then continue fi FILE=`echo $i|awk '{print $NF}'` echo $i|grep \/ /dev/null 2/dev/null

RE: Display unix directory hierarchy

2003-12-23 Thread Stephen.Lee
In addition to the fine solution from Bambi, Here's another approach that I think will work. I did only minimal testing (in TRUE development tradition. But ... But ... It worked OK in test!). One caveat: This relies on recursion, so on a big directory tree you might get swatted with OS resource