![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| need help listing/sorting files | dave_angel | Shell Programming and Scripting | 2 | 11-23-2006 07:16 PM |
| How can i get directory listing? | haisubbu | UNIX for Dummies Questions & Answers | 2 | 08-25-2006 09:03 AM |
| Full Directory Listing... | B14speedfreak | UNIX for Dummies Questions & Answers | 5 | 05-11-2006 08:06 AM |
| Timestamp in directory listing | vijashok | UNIX for Dummies Questions & Answers | 2 | 10-06-2005 10:03 AM |
| Recursive directory listing without listing files | psingh | UNIX for Dummies Questions & Answers | 4 | 05-10-2002 10:52 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Sorting Directory Listing
If I do an ls -l on a directory I get this:
-rw-r--r-- 1 root other 5248094 Jun 24 03:56 monitor.log.7 -rw-r--r-- 1 root other 5248303 Jul 11 11:19 ct.log.1 -rw-r--r-- 1 root other 5248907 Jun 29 06:01 ct_monitor.log.5 -rw-r--r-- 1 root other 5249042 Jun 19 00:55 ct_monitor.log.9 -rw-r--r-- 1 root other 5376119 Jul 11 03:31 pLog.log etc If I want to sort if by date how would I go about it? I Googled and found this: sort -k1,1M -k2n but when trying it it sorted it by size. I don't really understand what sort -k1,1M -k2n refers to, when I changed it to sort -k2,2M -k3n. It did the same thing, I was thinking it might sort the next column. Thanks. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|