Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jul 2001 21:58:33 -0700
From:      "Ted Mittelstaedt" <tedm@toybox.placo.com>
To:        "Mike Meyer" <mwm@mired.org>, "Wing Tim" <twchim1@hotmail.com>
Cc:        <questions@FreeBSD.ORG>
Subject:   RE: Listing all files and directories in the kernel
Message-ID:  <004201c11721$f3aac820$1401a8c0@tedm.placo.com>
In-Reply-To: <15201.28564.745944.446480@guru.mired.org>

next in thread | previous in thread | raw e-mail | index | archive | help
A friend of mine worked out the following script, this may be something
along the lines of what your looking for:

(cd $1;pwd)
find $1 -type d -print | sort -f |
sed -e "s,^$1,," -e "/^$/d" -e \
"s,[^/]*/\([^/]*\)$,\+-----\1," -e "s,[^/]*/,|     ,g"

save it to a file named "dtree" then as root do something like

sh dtree /

to get an idea of the output.

Ted Mittelstaedt                                       tedm@toybox.placo.com
Author of:                           The FreeBSD Corporate Networker's Guide
Book website:                          http://www.freebsd-corp-net-guide.com


>-----Original Message-----
>From: owner-freebsd-questions@FreeBSD.ORG
>[mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Mike Meyer
>Sent: Friday, July 27, 2001 6:42 AM
>To: Wing Tim
>Cc: questions@FreeBSD.ORG
>Subject: Re: Listing all files and directories in the kernel
>
>
>Wing Tim <twchim1@hotmail.com> types:
>> Hi all,
>>   Is there any way or any command in terminal to list out the tree
>(that is,
>> locations of all files and directories) in the kernel?
>
>Your question - as stated - doesn't make sense. Files and directories
>are on disk, not in the kernel. You can use "ls -R" to list all the
>files and directories in a specific directory. Without knowing what
>you really want, I can't say what directory you want to list.
>
>	<mike
>--
>Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
>Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-questions" in the body of the message
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?004201c11721$f3aac820$1401a8c0>