How to list the files based on the modification time using the find command?

Hi All,

I need to list the files based modification time of the files from a directory, I cannot use "ls -t" as there are lot of files, which "ls" command cannot handle. New files will land there daily. So iam looking for an alternative through "find"command.

All suggestions are welcomed.

Thank you.:b:

find is not a "go-faster ls". It uses the same readdir() calls, etc, that ls does.

So, if it's too many files for ls to handle, you are in trouble. You're choking your filesystem with too many millions of files in the same folder, something no filesystem handles well, and it will only get worse.

You'll need to reorganize in some way, methinks, so you don't have thousands of files in the same folder, and/or keep a log of when files arrive.

I got involved in a discussion on this subject recently. See above link.

What Operating System and version you you have and what Shell do you use?

How many files?
Can you demonstrate this problem?

What does this sentence mean? Can you give an example?

How many files?
Can you demonstrate this problem?

The files will be small in size say 2kb and the files will cleared after the size of the directory reaches some point. The number of files in the directory might be 3500 to 4000 files or may be more than that.

What Operating System and version you you have and what Shell do you  use?

uname -o
GNU/Linux
This is a VMware server..

Your number of file is not too many for "ls".

Please explain what you are trying to do.

Agreed, 4,000 files is not a lot.

40,000 would be getting there.

400,000 would be a big problem.