Re: listing files by modification time

2009-02-17 Thread Albert Hopkins
On Tue, 2009-02-17 at 19:46 +0530, Deepak Rokade wrote: > > Yes I can do that but for that I will have to go through entire list > of files and also I will have to first get the whole list of files > present in directory. > > In case of my application this list can be huge and so want to list > t

Re: listing files by modification time

2009-02-17 Thread Deepak Rokade
Yes I can do that but for that I will have to go through entire list of files and also I will have to first get the whole list of files present in directory. In case of my application this list can be huge and so want to list the files which suits my criteria. Similar to the unix find command I se

Re: listing files by modification time

2009-02-17 Thread Chris Rebert
On Tue, Feb 17, 2009 at 4:31 AM, Deepak Rokade wrote: > Hi, > > I am using python 2.5 on sun solaris. > > I want to limit the number of files returned by os.listdir() to some number > (say 1000), how can I do it ? > > Also I wan to list the files only if they are older than some x days, how > can

listing files by modification time

2009-02-17 Thread Deepak Rokade
Hi, I am using python 2.5 on sun solaris. I want to limit the number of files returned by os.listdir() to some number (say 1000), how can I do it ? Also I wan to list the files only if they are older than some x days, how can I do it? I can do this through shell script using command. find ${