Article View: comp.unix.sys5.misc
Article #17Re: dir tree program
From: "Educated bags" Neilski
Date: Tue, 29 Sep 1992 08:52
Date: Tue, 29 Sep 1992 08:52
30 lines
1397 bytes
1397 bytes
johno@boas.cogsci.uiuc.edu (John Oneill) writes:
>This may not be the place but...
Not really ... (crossposted to alt.sources, followups to alt.sources.d)
>I am looking for a dir tree program that will traverse the directory
>tree of a system and put this info into some sort of neet form.
>I have just taken a sysadmin job and would like to know where
>what, is. Without doing it myself.
This appeared in UnixWorld a couple of years ago.
#!/bin/sh
# @(#) dtree - prints a directory tree
dir=${1:-.}
(cd $dir ; pwd)
find $dir -type d -print | sort -f |
sed -e "s,^$1,," -e "/^$/d" -e \
"s,[^/]*/\([^/]*\)$,\`-----\1," -e "s,[^/]*/, | ,g"
-- neilski
--
nrp@csug.cs.reading.ac.uk \--------------------------------------------------
----------------------------\ Woke up this morning, out of bed I leaped,
Banged my head on the ceiling and I went straight back to sleep... -- Dylan
Technical Details
Message-ID:
<nrp.717756753@reading>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!reading!nrpReferences:
<BvBHDA.7sJ@news.cso.uiuc.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!reading!nrp
From: nrp@csug3.cs.reading.ac.uk ("Educated bags" Neilski)
Newsgroups: comp.unix.sys5.misc,alt.sources
Subject: Re: dir tree program
Message-ID: <nrp.717756753@reading>
Date: 29 Sep 92 08:52:33 GMT
References: <BvBHDA.7sJ@news.cso.uiuc.edu>
Sender: news@csug.cs.reading.ac.uk
Reply-To: nrp@csug.cs.reading.ac.uk
Followup-To: alt.sources.d
Organization: University of Reading
Lines: 30
Nntp-Posting-Host: angeles