[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Swap File



On Thu, 2006-06-29 at 17:49 +0100, Dave Smif wrote:
> Exactly. It really makes sense to me to sort!
> 
> dave@linuxdev:/dev$ ls -la loop*
> brw-rw----  1 root disk 7,  0 1996-06-04 02:47 loop0
> brw-rw----  1 root disk 7,  1 1996-06-04 02:47 loop1
> brw-rw----  1 root disk 7, 10 2002-03-20 01:13 loop10
> brw-rw----  1 root disk 7, 11 2002-03-20 01:13 loop11
> brw-rw----  1 root disk 7, 12 2002-03-20 01:13 loop12
> brw-rw----  1 root disk 7, 13 2002-03-20 01:13 loop13
> brw-rw----  1 root disk 7, 14 2002-03-20 01:13 loop14
> brw-rw----  1 root disk 7, 15 2002-03-20 01:13 loop15
> brw-rw----  1 root disk 7,  2 1996-06-04 02:47 loop2
> brw-rw----  1 root disk 7,  3 1996-06-04 02:47 loop3
> brw-rw----  1 root disk 7,  4 1996-06-04 02:47 loop4
> brw-rw----  1 root disk 7,  5 1996-06-04 02:47 loop5
> brw-rw----  1 root disk 7,  6 1996-06-04 02:47 loop6
> brw-rw----  1 root disk 7,  7 1996-06-04 02:47 loop7
> brw-rw----  1 root disk 7,  8 1996-06-04 02:48 loop8
> brw-rw----  1 root disk 7,  9 2002-03-20 01:13 loop9
> 
> dave@linuxdev:/dev$ ls -la loop* | sort
> brw-rw----  1 root disk 7,  0 1996-06-04 02:47 loop0
> brw-rw----  1 root disk 7,  1 1996-06-04 02:47 loop1
> brw-rw----  1 root disk 7,  2 1996-06-04 02:47 loop2
> brw-rw----  1 root disk 7,  3 1996-06-04 02:47 loop3
> brw-rw----  1 root disk 7,  4 1996-06-04 02:47 loop4
> brw-rw----  1 root disk 7,  5 1996-06-04 02:47 loop5
> brw-rw----  1 root disk 7,  6 1996-06-04 02:47 loop6
> brw-rw----  1 root disk 7,  7 1996-06-04 02:47 loop7
> brw-rw----  1 root disk 7,  8 1996-06-04 02:48 loop8
> brw-rw----  1 root disk 7,  9 2002-03-20 01:13 loop9
> brw-rw----  1 root disk 7, 10 2002-03-20 01:13 loop10
> brw-rw----  1 root disk 7, 11 2002-03-20 01:13 loop11
> brw-rw----  1 root disk 7, 12 2002-03-20 01:13 loop12
> brw-rw----  1 root disk 7, 13 2002-03-20 01:13 loop13
> brw-rw----  1 root disk 7, 14 2002-03-20 01:13 loop14
> brw-rw----  1 root disk 7, 15 2002-03-20 01:13 loop15
> 
> 
> On 6/27/06, Graham Campbell <gc1111@xxxxxxxxxxxxx> wrote:
> > On Tue, 2006-06-27 at 11:13 +0100, Dave Smif wrote:
> > > That sounds like a bug to me then? Surely it should use a numerical
> > > sort order in this case?
> >
> > This is exactly the behavior of the sort command.
> > --
> > Graham Campbell <gc1111@xxxxxxxxxxxxx>
> >
> >

I finally go around to looking at this again. By using the long list
format you are sorting on the device number, not the name. (sort starts
from the left of the line).
Here is a more relevant result (note -1 is dash-one, not dash-ell):
[gc@sirius ~/test]$ ls -1
test#0
test#1
test#10
test#11
test#12
test#2
test#3
test#4
test#5
test#6
test#7
test#8
test#9
[gc@sirius ~/test]$ ls -1|sort
test#0
test#1
test#10
test#11
test#12
test#2
test#3
test#4
test#5
test#6
test#7
test#8
test#9

-- 
Graham Campbell <gc1111@xxxxxxxxxxxxx>


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.