Alex Rivera | Logout

Sort 'ls' output by name

Asked 2009-05-18T15:16:18.290
194

Can you sort an ls listing by name?

Edit
Report

1 Answer

8

Notice: "a" comes after "Z":

touch A.txt aa.txt Z.txt 

ls

Output:

A.txt   Z.txt   aa.txt
answered 2009-10-30T21:02:55.770

Your Answer