tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Implementing file-attributes with "stat"?


From: Kai Großjohann
Subject: Implementing file-attributes with "stat"?
Date: Mon, 25 Aug 2003 22:22:13 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Tramp now uses a Perl implementation of file-attributes, if Perl is
available on the remote host.  But I get the feeling it might be nice
to use the "stat" program, if available.  But I know nothing about
it.  Does somebody know if stat can be used in a portable way such
that it returns the data we need?

(Type C-h f file-attributes RET for information on the data that's
needed.  Some of it, such as the device number, can be faked without
too much trouble.)

I would be happy if you could do the Lisp part, but if you don't want
to do that, it's also fine.  What I need is information on the
command line to use to invoke stat, and how to parse the result.  I
typed "stat /" but the result was not *that* enlightening.  Hm.
Though, with some pondering, I could probably figure it out.

How portable is stat?  Does it behave similarly on all systems where
it is available, or are there very different implementations?
(Cf. uuencode and uudecode; there are many implementations out that
that differ quite a bit.)
-- 
Two cafe au lait please, but without milk.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]