home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume32
/
tbtree
/
part01
/
README
next >
Wrap
Text File
|
1992-10-15
|
2KB
|
58 lines
AN ORIGINAL POSTING was in response to a recent request in this group
for a "tree" program for Unix; a system manager wanted to get
a visual idea of where things were on his/her new system.
[last minute note: Thanks for sending me your updates! When I get a chance,
I'll try to integrate them and repost them. - tb]
CHANGES IN THIS POSTING:
1) In the case of a symbolic link that points to a file that
does not exist (e.g., you create a linkfile "foo" that points
to a file named "foobar", but then delete "foobar", leaving
"foo"):
ORIGINAL VERSION:
"Error on stat." would appear on standard error.
THIS VERSION:
Nothing happens; tbtree recognizes the "Not There" error.
2) In the case of tbtree being invoked on, or descending into,
a directory for which you have no "search" (or "execute")
permissions.
ORIGINAL VERSION:
"Error on stat." would appear on standard error.
The directory is skipped.
THIS VERSION:
"Error running stat() on xyzzy: No permission" (or an
equivalent) would appear on standard error, as the
system's "Print Error" ("perror()") function is used.
(And where "xyzzy" is the directory's path.)
The directory is skipped.
3) As a result, errors in general for the stat() and lstat()
calls are better reported.
4) EXTRA FEATURE: If there is(are) a directory name which usually
you can't stand descending into (say you have a whole extra hard
disk mounted as a subdirectory in more than one place), you
can "uncomment" a small block herein where I show how to hard-
code a "prune". Yes, it should be a command line option; but
think about it ... if there is such a name on your system (there
are three on mine) then you will know about it when you install
this.
Do like I did: compile once as "tbtree", then install the prune
and call it "tbtree_prune". Or make it whatever way you like.
This has run on Sun machines. As I comment within, try it on your
Unix; you have nothing to lose, and it looks pretty portable.
If you improve it, please send me a copy.
tombaker@world.std.com || tabaker@aol.com || BIX as tombaker