tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* FW: Directory Tree
@ 2000-04-28  0:53 Danielle Georgette
  0 siblings, 0 replies; only message in thread
From: Danielle Georgette @ 2000-04-28  0:53 UTC (permalink / raw)
  To: tru64-unix-managers

Morning all,

The following script gives a neat directory tree structure listing.
It was posted on the AIX managers list, but its so handy I thought 
people here might get good use from it as well. Its a shell script so it 
works equally well on Tru64 - i've used it a few times already. 

So all thanks Daniel Clark, and I hope you don't mind the cross-post Dan!

Danielle

+-----------------------------------+---------------------------------+
| Danielle Georgette                | Two major products came out of  |
| Unix Admin                        | Berkeley: LSD and UNIX. I don't |
| danielle.georgette@asx.com.au     | believe this to be coincidence. |
+-----------------------------------+---------------------------------+
|      All opinions are my own unless clearly stated otherwise.       |
+---------------------------------------------------------------------+


-----Original Message-----
From: Robert Miller [mailto:Rmille1@SMUD.ORG] 
Sent: Friday, April 28, 2000 1:54 AM
To: AIX-L@PUCC.PRINCETON.EDU
Subject: Re: Directory Tree


Example: Linux.

'nuff said. ;)

--rm

> -----Original Message-----
> From: Clark, Daniel B. (ITSC) [SMTP:daniel.clark@MAIL.IHS.GOV]
> Sent: Thursday, April 27, 2000 8:47 AM
> To:   AIX-L@PUCC.PRINCETON.EDU
> Subject:      Re: Directory Tree
>
> To be honest, this is what I was hoping would be done.  The best tools are
> the ones that start with an idea then improved upon.
>
> thanks,
>
> Dan Clark
>
> -----Original Message-----
> From: Bruce Harvey [mailto:BruceH@ROUTESCAPE.COM]
> Sent: Thursday, April 27, 2000 9:32 AM
> To: AIX-L@pucc.Princeton.EDU
> Subject: Re: Directory Tree
>
>
> As must be usual among UNIXers, I loved it so much I added to it.
>
> a '-d' option to specify ONLY directories, and an optional argument
> to do another directory than the one you're in.
>
> Hope you don't mind, Dan!
>
> -----------------------------------------------------------------------
> Bruce T. Harvey ... Special Projects Developer ..... 410.403.2390 (vox)
> www.routescape.com ... b.t.harvey@bigfoot.com ...... 410.329.1114 (fax)
> http://surfree.homestead.com/btgmharvey/ ...... b.t.harvey@computer.org
> -----------------------------------------------------------------------
> Insight Distribution Systems-222 Schilling Circle-Hunt Valley, MD 21031
>
> -----------------------------------------------------------------------
>
> #!/bin/ksh
> #
> #  dir_tree
> # Display from current Directory Tree.
> #
> homedir=`pwd`
> dodir=""
> dowhat="Files and Directories"
> set -- `getopt d $*`
> if [ "$?" != "0" ]
> then
>         exit 1
> fi
>
> while [ "$1" != "--" ]
> do
>         case $1 in
>                 -d)     dodir="-type d " export dodir
>                         dowhat="Directories only" export dowhat
>                 ;;
>         esac
>         shift
> done
> shift
>
> if [ "$1" != "" ]
> then
>         cd $1
> fi
>
> { echo "$dowhat ... Directory: `pwd`"
> find . $dodir -print | sed '
>         s:^'$base':|:
>         s:/\([^/]*\)$:?? \1:
>         s:/[^ ?/]*:   |:g
>         s:?:_:g
>         '
> }
>
> cd $homedir
>
>
> -----------------------------------------------------------------------
>
>
> -----Original Message-----
> From: Clark, Daniel B. (ITSC) [mailto:daniel.clark@MAIL.IHS.GOV]
> Sent: Thursday, April 27, 2000 10:53 AM
> To: AIX-L@pucc.Princeton.EDU
> Subject: Directory Tree
>
>
> A couple of months ago, someone on the list had asked about a directory
> tree
> for AIX.  ...
>
> ----------------------------------------------------------------------
>
> Dan Clark
> Senior System Development Consultant
> Rose International,
> Indian Health Service
> Albuquerque

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-04-28  0:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-04-28  0:53 FW: Directory Tree Danielle Georgette

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox