Shell script to pick the oldest file

hi i need shell scrip to pick the oldest file...

i.e i need a script to pick the oldest file
I had input files in my input folder that are created on saturday,monday,tuesday .. i want a script such that first the script should pick saturday file ,then monday and then file created on tuesday..

thanx in advance..

Try to read about ls command from man pages.
You will surely get your answer.

Regards,

pamu

no use.. i read the ls command can u give me any other idea

try ls -1rt

i know that command .. it wil display all files with time and date ...
i want script to get the oldest file then the second oldest then the third oldest and so on...

No, that command will display fies in reverse time order with 1 column. Which is what you asked for.