Subject: Re: stat(1)
To: Steven M. Bellovin <firstname.lastname@example.org>
From: Richard Rauch <email@example.com>
Date: 12/28/2001 08:42:21
>Mine only puts out the times -- inode and size are easy enough to get
>from ls, as are owner and group. To me, the important thing is a
>format that's easily parseable by scripts.
Easily parsed output is definitely a plus in any shell command.
However, if the feature set of this command is based on whether or not
there's another way to get the information...ls can output all 3
timestamps if you ask. (ls -lT, ls -lTc, ls -lTu) Granted, to get all 3,
you'd need to run ls 3 times...
If the goal is to provide a way to avoid running multiple commands to get
full information (from within a script) on a set of files, then stat
should provide everything (not just the stuff that you can't already get
(I probably wouldn't bother with stat, if I still needed to use ls to get
other information anyway---even if I'd need to run ls 3 times where I
could use 1 stat plus 1 ls instead. For one thing, running two seperately
(presumably statically linked) executables would have more impact on the
system cache. For another, it would just be more trouble to deal with two
commands---one of which is apparently so non-standard that people haven't
yet agreed on either content or format for its output.)
In short, IMHO, depending on one's point of view: Either ls suffices
already, or a ``more fullsome'' version is desired to print *everthing* in
a parseable (not necessarily human-readable) format.
(And, contrary to Peter's claim, not everyone has written one. I've never
done so. (^&)
``I probably don't know what I'm talking about.'' --firstname.lastname@example.org