- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: ls options
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
тАО05-10-2007 12:32 AM
тАО05-10-2007 12:32 AM
Re: ls options
>But from other directories if i give
ls -lrt /temp/*ABC,
the output differs than the above.
Different how? I just see the full path vs just the filename:
Dec 14 2005 threadinit.o
Dec 14 2005 /var/tmp/threadinit.o
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2007 08:18 PM
тАО06-20-2007 08:18 PM
Re: ls options
ls -rt will give the right output only till the minutes.
i.e if the files are all created in one minute, with few seconds gap, ls will give the output in alphabetical order.
Is there any way to get the order right, keeping in mind the seconds of creation also?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2007 08:47 PM - edited тАО09-25-2011 08:10 PM
тАО06-20-2007 08:47 PM - edited тАО09-25-2011 08:10 PM
Re: ls options
>ls -rt will give the right output only till the minutes.
Since ls(1) has the timestamp in seconds, you have to assume it sorts based on that. Not minutes then alpha.
>Is there any way to get the order right, keeping in mind the seconds
This is done.
$ touch -t 200706210200.01 aa
$ touch -t 200706210200.09 zz
$ ll -t -og
-rw-rw-r-- 0 Jun 21 02:00 zz
-rw-rw-r-- 0 Jun 21 02:00 aa
$ ll -rt -og
-rw-rw-r-- 0 Jun 21 02:00 aa
-rw-rw-r-- 0 Jun 21 02:00 zz
You can also change the ls output format by looking at these posts:
- « Previous
-
- 1
- 2
- Next »