bug-coreutils
[Top][All Lists]
Advanced

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

Re: Suggested enhancement to du command - show last modified date.


From: Paul Eggert
Subject: Re: Suggested enhancement to du command - show last modified date.
Date: Thu, 09 Jun 2005 17:13:36 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

William Brendling <address@hidden> writes:

> I am using the stat structure returned by the FTS routines. This does
> not give nanosecond resolution,

It does on modern platforms, and it should be used if available.
Please see lib/timespec.h for the details.

> Also I would not know what to do with the nanosecond resolution if I
> kept it. The date formating routine I borrowed just accepts time_t
> input.

Please use nstrftime to format time stamps with nanosecond resolution.
ls, date, etc. already do that, so you can look at them for examples.

> I agree that the "T" is ugly. However, I wanted a default format that
> did not include any whitespace, so that all those utilities that split
> fields on whitespace would regard the date & time as a single field.

There aren't any such utilities now, so presumably you're thinking
about future utilities?  But in that case they can handle two columns
just as easily as one.  They would already need to do that, to parse
the output of "ls", "date", etc.  If someone has a utility that cannot
handle nice-looking dates, they can invoke du with the --time-format
option and specify a format with the ugly "T".  Let's not make the
default format ugly simply because there may be some lame utilities
out there (which have not been written yet).




reply via email to

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