- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: command needed - part 2
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2007 01:44 PM
тАО06-07-2007 01:44 PM
to list file sorted by modified date. the most recent on top. i try to use ll -tr *.t
but it shows the oldest on top.
thank you very much
Regards
ng
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2007 02:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2007 03:30 PM
тАО06-07-2007 03:30 PM
Re: command needed - part 2
ls -lrt|sort -nr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2007 06:34 PM
тАО06-07-2007 06:34 PM
Re: command needed - part 2
This is not apt to work unless the permissions are numeric. You of course can sort on the size field with -k5,5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2007 06:55 PM
тАО06-07-2007 06:55 PM
Re: command needed - part 2
-rw-rw-rw- 1 applprod dba 60710012 May 23 01:52 OFABAa25903.t
-rw-rw-rw- 1 applprod dba 60710012 May 23 01:47 OFKCAa25908.t
-rw-rw-rw- 1 applprod dba 4107657 Feb 24 16:36 OFRAAa22401.t
-rw-rw-rw- 1 applprod dba 2758721 Mar 24 15:43 OFQAAa04472.t
-rw-rw-rw- 1 applprod dba 2676846 Mar 2 15:08 OFYBAa03238.t
-rw-rw-rw- 1 applprod dba 2665762 Feb 27 20:29 OFQAAa03313.t
-rw-rw-rw- 1 applprod dba 2192103 Mar 2 16:26 OFZBAa12621.t
-rw-rw-rw- 1 applprod dba 1794439 Mar 18 16:07 OFPBAa18593.t
-rw-rw-rw- 1 applprod dba 1682356 Jun 6 08:21 OFBAAa09498.t
-rw-rw-rw- 1 applprod dba 1655439 Mar 24 17:15 OFRBAa04477.t
-rw-rw-rw- 1 applprod dba 1528237 Apr 28 15:54 OFWAAa03244.t
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2007 07:07 PM
тАО06-07-2007 07:07 PM
Re: command needed - part 2
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2007 07:13 PM
тАО06-07-2007 07:13 PM
Re: command needed - part 2
It looks like it was: ?
$ ll | sort -nr -k5,5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2007 07:33 PM
тАО06-07-2007 07:33 PM
Re: command needed - part 2
Your command sorts by size, not time.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2007 09:12 PM
тАО06-07-2007 09:12 PM
Re: command needed - part 2
Of course. I first said that sort -n won't work. Then said -n -k5,5 would sort on size.
Then when ng produced that weird output, I suggested that was the mistake.
Getting back to the original question, as everyone has said, use: "ll -t"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2007 12:38 AM
тАО06-08-2007 12:38 AM
Re: command needed - part 2
ll -t
this works fine!
e.g.
$ ll -t |head
total 88400
-rw-r--r-- 1 oracle oinstall 298 Jun 8 16:00 count_sessions.lis
-rw------- 1 oracle oinstall 2105344 Jun 8 15:23 opm_sys_shm.mem
-rwxr-xr-x 1 oracle oinstall 0 Jun 8 15:15 opm_sys_mtx.1181301311
-rw------- 1 oracle oinstall 0 Jun 8 15:15 opm_sys_shm.sem
-rw-r--r-- 1 oracle oinstall 44360107 May 22 14:39 UDUMP.TAR.Z
-rw-r--r-- 1 oracle oinstall 226782 May 21 13:19 listbackup20070521.txt
-rw-rw-rw- 1 root sys 9498 Apr 16 10:26 crontab.txt
-rw-rw-rw- 1 root sys 11278 Apr 12 15:06 print_manifest.slx2.txt
-rw-r--r-- 1 oracle oinstall 2285 Apr 12 11:56 mystack
$
kind regards
yogeeraj