1 |
On 2006-01-07 20:01:25 +0100 (Sat, Jan), Holly Bostick wrote: |
2 |
> Willie Wong schreef: |
3 |
> > On Sat, Jan 07, 2006 at 04:17:11PM +0100, Penguin Lover Holly Bostick |
4 |
> > squawked: |
5 |
> > |
6 |
> >> (how do you get ls to also include the @#$%#$ *year*??) |
7 |
> > |
8 |
> > |
9 |
> > Sorry, couldn't help with the rest of your problem, but I think it is |
10 |
> > assumed that ls will display the year only for files older than a |
11 |
> > year old. Quite clever, in my opinion. |
12 |
> |
13 |
> OK, I see what you mean-- or maybe I don't: |
14 |
> |
15 |
> I see that many files that are more than a year old then are followed by |
16 |
> the year, but some are not, and some which are less than a year old are |
17 |
> followed by a year. |
18 |
> |
19 |
> -rw-r--r-- 1 motub somegroup 1661 jul 13 13:52 more_what works.txt |
20 |
> (this must have been created in 2005) |
21 |
> |
22 |
> but this file is less than a year old and is still fully dated: |
23 |
> |
24 |
> -rw-rw-r-- 1 motub somegroup 581 jan 31 2005 computeruniverse_rma.txt |
25 |
> |
26 |
> But even leaving aside the inconsistencies (only for the purposes of |
27 |
> this discussion), this is not the behaviour I expect or in fact desire. |
28 |
> I normally expect the year to be displayed whenever the current calendar |
29 |
> year is different from that associated with the file-- thus, if the file |
30 |
> was created in 2006, I would not expect the year to be shown, but if it |
31 |
> was created in 2005, I would expect the year to be shown, whether or not |
32 |
> the current date was one year or more from the month and day that the |
33 |
> file was created. |
34 |
|
35 |
It's a matter of taste, but I would rather keep this historical |
36 |
behaviour. On January the 1st you would see tiestamps from yesterday |
37 |
similiar to the 'very-old-ones'. |
38 |
|
39 |
> Rather than go off on a rant, I will ask mildly: is there any way to |
40 |
> change the default behaviour to more reflect my expected behaviour? Not |
41 |
> so much asking you to tell me how to do it as asking if those of you who |
42 |
> have already read man ls whether there is a solution to be found when I |
43 |
> have the time to read it myself. |
44 |
|
45 |
info ls, section * Formatting file timestamps:: |
46 |
" A timestamp is considered to be "recent" if it is less than six |
47 |
months old, and is not dated in the future." |
48 |
|
49 |
and further: |
50 |
" For example, `--time-style="+%Y-%m-%d %H:%M:%S"' causes..." |
51 |
|
52 |
HTH |
53 |
|
54 |
-- |
55 |
No virus found in this outgoing message. |
56 |
Checked by "grep -i virus $MESSAGE" |