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

Re: Samba ls date weirdness

On 20091023_124045, PaulNM wrote:
> On Fri, 2009-10-23 at 11:05 -0500, Boyd Stephen Smith Jr. wrote:
> > On Friday 23 October 2009 09:23:31 PaulNM wrote:
> > > The problem is the date info sometimes switches from the time of day to
> > > the year or the other way around.  This messes up the diff, so it shows
> snip
> > From the SUSv2 description of the 'ls' utility:
> >  The <date and time> field shall contain the appropriate date and timestamp
> Thanks for telling me about SUSv2.  I've installed susv2 and susv3 now
> and will look them over.
> > From the manpage for GNU 'ls':
> >  --time-style=STYLE
> I was well aware of this option, the problem was that the time display
> seemed to be changing randomly, even when the options were unchanged.
> The ls manpage makes no mention whatsoever about date/time field changes
> based on how old the timestamp is. 
> That "feature" should really be mentioned in the man page, or at least a
> pointer to more information.
> These scripts have been running for months now, and periodic google
> searches didn't find anything except references on how to format
> date/time field.
> Thank you though, I've made some changes to the scripts that hopefully
> will fix it.
> PaulNM

For use in scripts, I have found it worthwhile to simply override the
whole recent vs older stuff with a single format of my own choosing.
I like "--time-style=+%Y%m%d_%H%M%S". I tried "--time-style=+%s" for a
while. It is more compact, but much harder for a mere mortal to

Paul E Condon           

Reply to: