Afficher un message
Vieux 09/11/2006, 16h34   #4
yannick.dhennin@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Script to sort file by access time

Hi,

thanks for your answers.

the problem is when I'm doing ls -ltu or stat command the access time
is modified at the time the command is done.

Is it possible to have access to tha access time information of a file
without modify it ?

Thanks a lot,

Yannick.

Stephane CHAZELAS a écrit :

> 2006-11-09, 10:13(+01), Michael Tosch:
> > yannick.dhennin@gmail.com wrote:
> >> Hi,
> >>
> >> I have a problem to develop a script that sort files by access time.
> >>
> >> I've tried the command ls -ltu or stat -c "%x %n" *, but the problem is
> >> that when i'm launching the script, the date of last access is update
> >> with the time of the script.
> >>
> >> Do you have an idea for this problem ?
> >>

> >
> > ??
> > The atime does not change by an ls or stat command.
> > ls -1tu
> > should work ok.

> [...]
>
> Maybe the OP did a
>
> ls -ltu *
>
> in which case the atime of the directories where updated as
> their content was read.
>
> ls -ltu
>
> or
>
> ls -ltud -- *
>
> should not have the problem.
>
> --
> Stéphane


  Réponse avec citation
 
Page generated in 0,06399 seconds with 9 queries