9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] proposed stat(1) - input requested
@ 2003-11-02 13:46 lucio
  0 siblings, 0 replies; only message in thread
From: lucio @ 2003-11-02 13:46 UTC (permalink / raw)
  To: 9fans

I hacked Dan Cross's "walk.c" in the style of Lunix's date(1) -
actually a lot more like *BSD's stat(1), which I only discovered
recently - so that it would display file properties subject to a
format pattern, while at the same time allowing directory descent and
all those useful if sacrilegious things.

I borrowed ape's strftime(2) as well - as an additional insult - and
the extremely raw and undocumented result is now on my web site:
<http://wow.proxima.alt.za/src/stat/>.

The reason I'm posting it well ahead of maturity is that there are
innumerable arbitrary decisions that were made on the spur of the
moment and some feedback from users would avoid continuing on a
slippery downwards slope.

There are two major flaws (not counting the actual existence of the
program, I will ignore criticism on that score :-) that I can think
of:

1.  It processes the directory after the contents, which is both
unexpected and has an unpleasant side effect: the details of a
directory aren't output if the permissions to descend the directory
are not granted.  I'm sure I can fix this easily, but it's not urgent.

2.  It is limited to the Plan 9 namespace, whereas it would be nice if
it recognised the properties of foreign filesystems.  It is this last
feature that made me seek the help of the community: I know that some
foreign file attributes are already accounted for, but perhaps they
are not conveyed over 9P2000 or whatever (I'm thinking of u9fs, for
example, and dossrv).  It would be useful to tidy these up.  I can't
seem to find the details, although I recall reading them somewhere,
possibly in the 9P2000 documentation.

Largely, stat(1) already is flexible enough to look like the user
wishes it to look, but the aesthetics could doubtlessly be improved
radically with some lateral thinking.  I'm not possessive, please feel
free to submit the most extreme alterations and I'll only reject them
if I have a good explanation for doing so.

++L

PS: No, it does not do web browsing :-)



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

only message in thread, other threads:[~2003-11-02 13:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-02 13:46 [9fans] proposed stat(1) - input requested lucio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).