[Nottingham] ls --time=atime
Martin
martin at ml1.co.uk
Thu Nov 23 18:40:06 GMT 2006
Peter Chang wrote:
> On Thu, 23 Nov 2006, Martin wrote:
>
>> Folks,
>>
>> I'm trying to get a ls listing of files that shows ALL their times:
>> creation, modified, access.
>
> Don't think you can get them simultaneously with ls(1). You may want to
> use find(1).
Now that is a good idea!
> The following works for me:
>
> $ ls --time=ctime -l aoreviewform.doc
> -rw-rw-r-- 1 peter peter 16896 Apr 22 2003 aoreviewform.doc
>
> $ ls --time=atime -l aoreviewform.doc
> -rw-rw-r-- 1 peter peter 16896 Jan 14 2005 aoreviewform.doc
>
> $ ls --version
> ls (coreutils) 4.5.3
ls --version
ls (coreutils) 5.2.1
And:
$ unalias ls
[~ :)]$ ls -l fontslist
-rw-r--r-- 1 martin martin 2626 Mar 3 2004 fontslist
[~ :)]$ ls --time=ctime -l fontslist
-rw-r--r-- 1 martin martin 2626 Aug 7 12:37 fontslist
[~ :)]$ ls --time=atime -l fontslist
-rw-r--r-- 1 martin martin 2626 Nov 23 14:20 fontslist
OK, so the "-l" is needed *also*! (Works fine without the unalias)
But now... So how do those dates add up? I thought the "-l" default
showed the "modification" time?
Thanks,
Martin
--
----------------
Martin Lomas
martin at ml1.co.uk
----------------
More information about the Nottingham
mailing list