On Sat, 02 Aug 2003 at 15:47 GMT, Eddie wrote:This has been answered several times in comp.unix.shell. Search> Hi all,
> I know such thing has been posted long time ago (below I will summarize what
> the answers were at that time), but no real answer.
> How can I easily get the modification time of a file in Korn shell (doesn't
> matter whether in d-m-y [m-d-y] h:m:s or in seconds from epoch; however I
> prefer seconds since epoch) with only use of Korn shell and "basic Unix
> commands" ??
> Last time this was posted (by someone else), the two answers were:
> - Some Unix flavours have the stat command my reply: [but what
> about the flavours that don't??]
> - Use: perl -e 'print((stat("filename")), "\n")' my reply: [what
> if I don't want to use Perl, because it's not on the box and I do not want
> to install??]
> - Create a C-binary that uses the stat system call my reply: [I
> just want to have to copy the ksh script to the box without having to
> distribute any other binaries]
> I have been searching for a good answer, but haven't found it.
> Perhaps one of you??
the archives for that group: <http://tinyurl.com/iuo3>
Chris F.A. Johnson [url]http://cfaj.freeshell.org[/url]
My code (if any) in this post is copyright 2003, Chris F.A. Johnson
and may be copied under the terms of the GNU General Public License