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
Forums
Discussions
Discussions
Discussions
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
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
11-26-2005 08:30 PM
11-26-2005 08:30 PM
rw-r--r-- cma dba 2217912320 10/29/05 10:39:10 Oct_29_2005_1010.tar
-rw-r--r-- cma dba 183522816 11/05/05 22:51:18 Nov_5_2005_2250.tar
-rw-r--r-- cma dba 0.553 Gb 06/22/05 23:34:35 Jun_22_2005_2330.tar
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2005 09:44 PM
11-26-2005 09:44 PM
Re: sort
try this:
#ll -t
:-)
or
|awk '{print $(NF-2)" "$(NF-1)" "$0}' |sort -n
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2005 02:30 AM
11-27-2005 02:30 AM
Re: sort
Use #ls -lrt
This will list the files with date and time sorted in ascending order
Regards,
Sunil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2005 04:53 AM
11-27-2005 04:53 AM
Re: sort
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2005 09:48 AM
11-27-2005 09:48 AM
Re: sort
You can use
# ll -rt , to get automatically sorted as per date/time.
Hth,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2005 03:20 PM
11-27-2005 03:20 PM
Re: sort
This is not an ls -l output. This is an output from omnidb command.
My requirement is to sort the lines using date field and the date happens to be in field 5 in first two lines and field 6 in last line in the above sample becuase the size of the file is in GB.
The real file has lot of entries and the date appears only in feild 5 and field 6.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2005 05:13 PM
11-27-2005 05:13 PM
Re: sort
sort -nk 5,6 file
Example:
# cat file1
rw-r--r-- cma dba 2217912320 10/29/05 10:39:10 Oct_29_2005_1010.tar
-rw-r--r-- cma dba 183522816 11/05/05 22:51:18 Nov_5_2005_2250.tar
rw-r--r-- cma dba 2217912320 10/25/05 10:39:10 Oct_29_2005_1010.tar
-rw-r--r-- cma dba 0.553 Gb 06/22/05 23:34:35 Jun_22_2005_2330.tar
-rw-r--r-- cma dba 0.553 Gb 03/22/05 23:34:35 Jun_22_2005_2330.tar
# sort -nk 5,6 file1
-rw-r--r-- cma dba 0.553 Gb 03/22/05 23:34:35 Jun_22_2005_2330.tar
-rw-r--r-- cma dba 0.553 Gb 06/22/05 23:34:35 Jun_22_2005_2330.tar
rw-r--r-- cma dba 2217912320 10/25/05 10:39:10 Oct_29_2005_1010.tar
rw-r--r-- cma dba 2217912320 10/29/05 10:39:10 Oct_29_2005_1010.tar
-rw-r--r-- cma dba 183522816 11/05/05 22:51:18 Nov_5_2005_2250.tar
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2005 05:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2005 06:02 PM
11-27-2005 06:02 PM
Re: sort
It works great.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2005 06:02 PM
11-27-2005 06:02 PM
Re: sort
It works great.