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

Re: Samba ls date weirdness



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
> a bunch of changed files when there havn't been any changes.
>
> EX:
>     < drwxrwxrwx 1 0 Apr 20 13:38 Recipes
>     ---
>
>     > drwxrwxrwx 1 0 Apr 20  2009 Recipes

From the SUSv2 description of the 'ls' utility:
 The <date and time> field shall contain the appropriate date and timestamp
 of when the file was last modified. In the POSIX locale, the field shall be
 the equivalent of the output of the following date command:
  date "+%b %e %H:%M"
 if the file has been modified in the last six months, or:
  date "+%b %e  %Y"
 (where two <space>s are used between %e and %Y ) if the file has not been
 modified in the last six months or if the modification date is in the future,
 except that, in both cases, the final <newline> produced by date shall not be
 included and the output shall be as if the date command were executed at the
 time of the last modification date of the file rather than the current time.

From the manpage for GNU 'ls':
 --time-style=STYLE
  with -l, show times using style STYLE: full-iso, long-iso,  iso,  locale,
  +FORMAT. FORMAT is interpreted like `date'; if FORMAT is
  FORMAT1<newline>FORMAT2, FORMAT1 applies to non-recent files and FORMAT2 to
  recent files; if STYLE is prefixed with `posix-', STYLE takes effect only
  outside the POSIX locale

Please use the available documentation before consulting the list.
-- 
Boyd Stephen Smith Jr.           	 ,= ,-_-. =.
bss@iguanasuicide.net            	((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy 	 `-'(. .)`-'
http://iguanasuicide.net/        	     \_/

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: