File Sorting As Per The Name

hello

Please tell me the command to sort files in specific directory

i have several files in one directory the files names are
2006-01-25
2006-01-23
2006-01-08
2006-01-07

I WANT TO DISPLAY FILES DATEWISE . THE LATEST DATE SHOULD BE FIRST FILE AND OLDEST WILL BE LAST ONE
PLS HELP ME

for my requirement timestamp and modification date of file doesnt matter

i want to list files by date wise

The ls isn't giving you what you need? Have you searched the man page?

man ls

You Can Use Db Queries For Date By Arrangindg Into The Date Format Unix

If you think about it, since the filenames are "YYYY-MM-DD" then when you sort them they will be in date order. So try using ls -r or sort -r

hello

i am using this command only to take a list of file
ls -r -1

files sorted by name wise and on each row displaying one name of file .

I need help to display 2 name of files in each row

Try that :

ls -r -1 | sed -e 'N;s/\n/ /'

ls -r | paste - -

it works ls -r | paste - - thanks a lot .

use the comand
ls -lt
I hope it will work.

Hi use this

ls -vl print the following

-rw-r--r-- 1 yhacks yhacks 0 2008-03-14 14:26 2006-01-07
-rw-r--r-- 1 yhacks yhacks 0 2008-03-14 14:26 2006-01-08
-rw-r--r-- 1 yhacks yhacks 0 2008-03-14 14:26 2006-01-23
-rw-r--r-- 1 yhacks yhacks 0 2008-03-14 14:26 2006-01-25

if want in reverse order use r option ls -lvr prints in reverse order