Leading spaces are common, actually
Leading spaces are common, actually
Posted Mar 28, 2009 1:57 UTC (Sat) by foom (subscriber, #14868)In reply to: Leading spaces are common, actually by nix
Parent article: Wheeler: Fixing Unix/Linux/POSIX Filenames
> Sorting numerically in GNU ls is done by 'ls -v'.
Huh, never knew that, interesting! Never would have found that from the man page, which says "-v sort by version". That seems a remarkably poor description of what it actually does.
> (By default, despite comments elsewhere in this thread, ls sorts ASCIIbetically, so " 2" comes before "1".)
Well, not exactly: GNU ls has a default sort which depends on the locale's collation settings, and most systems default to a locale like en_US.UTF-8, so most people have it sorting in a case/accent-insensitive manner by default on their systems.
