Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 307897 - ls is sorting directory names in a strange order
Summary: ls is sorting directory names in a strange order
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-05 14:50 UTC by Fred Krogh
Modified: 2010-03-06 01:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fred Krogh 2010-03-05 14:50:30 UTC
The way ls sorts names has changed and it is hard to guess just what it is doing.
I have a script that counts on the sort that comes from ls *.f > file.  I can understand that it NOW sorts dprpl.f after dprpl1.f, although I don't like it.  But the sort order divadb.f, diva.f, divag.f must be a bug.

Reproducible: Always




emerge --info =============

Portage 2.1.8.1 (default/linux/amd64/10.0, gcc-4.4.3, glibc-2.11-r1, 2.6.33-gentoo x86_64)
=================================================================
System uname: Linux-2.6.33-gentoo-x86_64-AMD_Opteron-tm-_Processor_242-with-gentoo-2.0.1
Timestamp of tree: Thu, 04 Mar 2010 21:00:24 +0000
app-shells/bash:     4.1_p2
dev-java/java-config: 1.3.7-r1, 2.1.10
dev-lang/python:     2.5.4-r2, 2.6.4-r1, 3.1.1-r1
dev-util/cmake:      2.8.0-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.0-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20-r1
sys-devel/gcc:       4.1.2, 4.3.4, 4.4.3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.32
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 sun-bcla-java-vm"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -ftree-vectorize -floop-interchange -floop-strip-mine -floop-block -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -ftree-vectorize -floop-interchange -floop-strip-mine -floop-block -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sfperms strict unmerge-logs unmerge-orphans"
GENTOO_MIRRORS="http://gentoo.osuosl.org http://ftp.ucsb.edu/pub/mirrors/linux/gentoo  http://cudlug.cudenver.edu/gentoo http://gentoo.binarycompass.org"
LANG="en_us"
LC_ALL="C"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_US en_US.ISO-8859-15 ISO-8859-15"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="   "
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl administrator aiglx alsa amd64 apache2 auctex audiofile bash-completion bcmath berkdb blas bonobo bzip2 cairo calendar cdr cdrom clamav clamd cli clisp clucene colordiff consolekit cracklib crypt ctype cups cxx dbus debugger deprecated dga discouraged divx-linux dri dvd dvdr dvdread emacs emul-linux86 esd extensions extras fam fastcgi fbcon ffmpeg flac fortran ftp gd gdbm glut gmail gnome gnome-keyring gnutls gphoto2 gpm graphite gstreamer gtk hal iconv imagemagick ipv6 java javascript jpeg kde kerberos kpathsea latex latin1 leim libclamav libnotify libwww logrotate mad maildir mbox mcal mime mmx mmxext mng modules motif mouse mozcalendar mozilla mp3 mpeg2 mpi mudflap multilib mysql mysqli nat ncurses nls nocd nosendmail nptl nptlonly nsplugin nvidia objc offensive ogg openexr opengl openmp osc oscar pam pcre pdf perl png policykit pop pop3d portaudio posix ppds pppd preview-latex python qt3support query-browser readline reflection regex replytolist rtc samba sasl secure-delete semantic-desktop session sharedmem smbclient sockets sound source sox spamassassin speex spl sqlite sse sse2 ssl svg symlink sysfs tcltk tcpd tetex thunderbird tiff truetype unicode usb vhosts vorbis wxwidgets wxwindows xcomposite xine xmail xorg xulrunner xvid" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US en_US.ISO-8859-15 ISO-8859-15" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-03-05 15:01:33 UTC
Not a bug, user configuration issue.

%% LC_ALL= ls
divadb.f  diva.f  divag.f
%% LC_ALL=C ls
diva.f  divadb.f  divag.f
%% ls -U
diva.f  divag.f  divadb.f

Comment 2 Fred Krogh 2010-03-05 15:09:23 UTC
Thanks -- this solves my problem, but it still seems strange to me.