Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jan 2012 13:09:13 -0800
From:      Devin Teske <devin.teske@fisglobal.com>
To:        "'Polytropon'" <freebsd@edvax.de>, "'Dan Nelson'" <dnelson@allantgroup.com>
Cc:        'FreeBSD Questions' <freebsd-questions@freebsd.org>
Subject:   RE: Exact timestamp for sorting and renaming files according to creation order
Message-ID:  <050701ccca5b$f2c34560$d849d020$@fisglobal.com>
In-Reply-To: <20120103220025.823e078f.freebsd@edvax.de>
References:  <20120103211150.41f1934d.freebsd@edvax.de>	<20120103204902.GG24192@dan.emsphone.com> <20120103220025.823e078f.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help


> -----Original Message-----
> From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd-
> questions@freebsd.org] On Behalf Of Polytropon
> Sent: Tuesday, January 03, 2012 1:00 PM
> To: Dan Nelson
> Cc: FreeBSD Questions
> Subject: Re: Exact timestamp for sorting and renaming files according to
creation
> order
> 
> On Tue, 3 Jan 2012 14:49:02 -0600, Dan Nelson wrote:
> > If you ask for the date to be printed in "float" (F) format, it gives
> > more precision.  The default is unsigned int (U) format.
> >
> > % stat -f "%N %FB" /COPYRIGHT
> > /COPYRIGHT 1306190895.046721049
> 
> Strangely, I only get a 000000000 "suffix" for any time stamp, no matter if I
create
> the file or apply the command as shown above to an existing file:
> 
> 	% stat -f "%N %FB" /COPYRIGHT
> 	/COPYRIGHT 1313951230.000000000
> 
> Am I missing some file system feature?
> 
> Otherwise, this _exactly_ looks like what I'm searching for. It doesn't need
to be
> a "human-readable" date representation.
> 
> by the way, I'm running FreeBSD 8.2-STABLE/x86 of late August 2011 here, file
> system used is UFS2.

On ZFS, all is well...

% df -hT /raid1/jails/package8-1/COPYRIGHT
Filesystem              Type    Size    Used   Avail Capacity  Mounted on
raid1/jails/package8-1  zfs     835G    672M    835G     0%
/raid1/jails/package8-1

% stat -f "%N %FB" /raid1/jails/package8-1/COPYRIGHT
/raid1/jails/package8-1/COPYRIGHT 1324356049.328275367

But alas, on UFS2:

% df -hT /COPYRIGHT
Filesystem     Type    Size    Used   Avail Capacity  Mounted on
/dev/mfid0s1a  ufs     989M     64M    846M     7%    /

% stat -f "%N %FB" /COPYRIGHT
/COPYRIGHT 1279505857.000000000

-- 
Devin



> 
> 
> 
> 
> --
> Polytropon
> Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"

_____________
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?050701ccca5b$f2c34560$d849d020$>