5

Using sort with alphanumeric filenames

view full story
linux-howto

http://unix.stackexchange.com – I'm sorting the results of a find command which finds all of the files in the current directory: find . -maxdepth 1 -type f -iname "*.flac" | sort What I'm expecting is a list like this: ./Track 1.flac ./Track 2.flac ./Track 3.flac ... ./Track 9.flac ./Track 10.flac ./Track 11.flac What I'm getting is a list like this: ./Track 10.flac ./Track 11.flac ./Track 1.flac ./Track 2.flac ./Track 3.flac ... ./Track 9.flac Is there an option to sort which will put them in alphanumeric ascending order so that numbers are evaluated properly? (HowTos)