DaemonForums  

Go Back   DaemonForums > Miscellaneous > General software and network

General software and network General OS-independent software and network questions, X11, MTA, routing, etc.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 11th April 2009
gosha gosha is offline
Spam Deminer
 
Join Date: Jun 2008
Location: China
Posts: 256
Thanked 0 Times in 0 Posts
Default ls sorting of numbered files

I don't really know where I should post this, but I remember Windows has the same behaviour, so I'm here.
Say I have some files named: 1 2 10 11 20
This is the order you expect, right?
Code:
$ ls
1  10 11 2  20
I have solved this in the past and present putting a zero in front of units, but I'm sure there's a better way to sort the files in the proper way. Is there?
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cleaning Portsnap files in /var/db/portsnap/files bram85 FreeBSD Ports and Packages 2 5th October 2009 09:54 AM
sorting special characters gosha Programming 15 9th April 2009 02:29 AM
finding files by uid carpman FreeBSD General 3 5th February 2009 07:51 PM
Encrypting Files JMJ_coder General software and network 22 25th October 2008 07:49 AM
Sorting Packages JMJ_coder NetBSD Package System (pkgsrc) 3 20th May 2008 01:08 AM


All times are GMT. The time now is 02:41 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick