From: Zinger on
Hi All,

I want to execute ls <filename> with a switch that should fetch all
files created with that name and are older than one day.

Pls help

TIA
From: Stachu 'Dozzie' K. on
On 03.12.2009, Zinger wrote:
> Hi All,
>
> I want to execute ls <filename> with a switch that should fetch all
> files created with that name and are older than one day.
>
> Pls help

ls . | man find

--
Stanislaw Klekot
From: Lew Pitcher on
On December 3, 2009 12:36, in comp.unix.shell, Zinger (zmasood(a)gmail.com)
wrote:

> Hi All,
>
> I want to execute ls <filename> with a switch that should fetch all
> files created with that name and are older than one day.

"Older" in what sense?
Have last been accessed more than one day ago?
Have last been modified more than one day ago?
Have last had their metadata changed more than one day ago?

Remember, Unix files have no inherent "creation date" metadata
(although /some/ Unix systems support such information).

HTH
--
Lew Pitcher
Master Codewright & JOAT-in-training | Registered Linux User #112576
Me: http://pitcher.digitalfreehold.ca/ | Just Linux: http://justlinux.ca/
---------- Slackware - Because I know what I'm doing. ------


From: Zinger on
On Dec 3, 12:56 pm, Lew Pitcher <lpitc...(a)teksavvy.com> wrote:
> On December 3, 2009 12:36, in comp.unix.shell, Zinger (zmas...(a)gmail.com)
> wrote:
>
> > Hi All,
>
> > I want to execute ls <filename> with a switch that should fetch all
> > files created with that name and are older than one day.
>
> "Older" in what sense?
> Have last been accessed more than one day ago?
> Have last been modified more than one day ago?
> Have last had their metadata changed more than one day ago?
>
> Remember, Unix files have no inherent "creation date" metadata
> (although /some/ Unix systems support such information).
>
> HTH
> --
> Lew Pitcher
> Master Codewright & JOAT-in-training   | Registered Linux User #112576
> Me:http://pitcher.digitalfreehold.ca/| Just Linux:http://justlinux.ca/
> ----------      Slackware - Because I know what I'm doing.         ------

Thanks. Older than 24 hours i.e. mtime +1

Note I do not want to use find as it searches recursively and I want
to just restrict to pwd.

Thanks
From: Bill Marcum on
On 2009-12-03, Zinger <zmasood(a)gmail.com> wrote:
> Hi All,
>
> I want to execute ls <filename> with a switch that should fetch all
> files created with that name and are older than one day.
>
> Pls help
>
There is no creation time in Unix.
find . -name foobar \( -mtime +1 -o -ctime +1 -o -atime +1 \) -print