From owner-freebsd-questions@FreeBSD.ORG Tue Sep 23 03:25:29 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 100CD16A4B3 for ; Tue, 23 Sep 2003 03:25:29 -0700 (PDT) Received: from munk.nu (mail.munk.nu [213.152.51.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id A250A43FE5 for ; Tue, 23 Sep 2003 03:25:27 -0700 (PDT) (envelope-from munk@munk.nu) Received: from munk by munk.nu with local (Exim 4.22) id 1A1kMI-000DHE-6r for freebsd-questions@freebsd.org; Tue, 23 Sep 2003 11:25:26 +0100 Date: Tue, 23 Sep 2003 11:25:26 +0100 From: Jez Hancock To: freebsd-questions@freebsd.org Message-ID: <20030923102526.GA50546@users.munk.nu> Mail-Followup-To: freebsd-questions@freebsd.org References: <20030923050750.GA38213@users.munk.nu> <20030923095835.GC62839@grimoire.chen.org.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030923095835.GC62839@grimoire.chen.org.nz> User-Agent: Mutt/1.4.1i Sender: User Munk Subject: Re: Unix timestamp X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2003 10:25:29 -0000 On Tue, Sep 23, 2003 at 09:58:35PM +1200, Jonathan Chen wrote: > On Tue, Sep 23, 2003 at 06:07:50AM +0100, Jez Hancock wrote: > > Is there a native FreeBSD shell util for returning the time in seconds > > since the Unix epoch? date(1) doesn't seem to do this, only the > > converse with the -r switch: > > > > [6:05:51] munk@users /home/munk# date -r "1064293551" > > Tue Sep 23 06:05:51 BST 2003 > > > > Just curious - I ended up making a simple C app that does the job. > > This works for me: > > ~,9:57pm> date '+%s' Thanks guys, this was the one I was after :) -- Jez http://www.munk.nu/