On 21/10/10 15:01, Jim Meyering wrote:
> Andreas Schwab wrote:
>> Jim Meyering <[email protected]> writes:
>>
>>> And besides, with coreutils-8.6 already released, reverting the
>>> change is no longer an option.
>>
>> Why?  I'm pretty sure more breakage will pop up over time.
> 
> Hmm... I see what you mean.
> Anyone using a distribution with coreutils-8.5 or older will
> think it's fine to treat $(stat -c %X) as an integer with no
> decimal or trailing fraction.
> 
> Is it worthwhile to create a new format, say %...:X (and same for Y and Z)
> that expands to seconds.nanoseconds and to revert %...X to the old
> seconds-only semantics?
> 
> That would make it so people could use stat's %X %Y %Z portably
> while new scripts can still get nanosecond accuracy when needed.
> 
> Here's PoC code:
> 
>   $ for i in %X %:X %Y %:Y %Z %:Z; do src/stat -c $i .; done
>   1256665918
>   1256665918.441784225

Or use '.' rather than ':' which also has the
advantage of being backward compat with older stats,

Reply via email to