[Bi-users] Automatic colouring for ls turned off

Kent Engström kent at nsc.liu.se
Thu Apr 28 09:57:54 CEST 2016


Dear Bi Users,

the CentOS 6 Linux distribution we use on Bi automatically installs an
alias for the "ls" command, that makes it really be "ls --color=auto".

That means that you get colour-coded output that can show if something
is a regular file, a directory, etc.

Unfortunately, to provide that extra information, "ls" has to perform
individual stat() calls on all the entries it displays. That turns out
to be rather costly on distributed filesystems such as Lustre where the
stat() call takes a long time. Also, it affects you more if you store a
lot of files in a single directory and type "ls" there.

After discussing this with our user representatives, we have turned off
the global alias that turns on colouring. If you want to get it back for
yourself, add

alias ls='ls --color=auto' 2>/dev/null

to your ~/.bashrc if you are a bash user (the default), or add

alias ls 'ls --color=auto'

to your ~/.tcshrc if you are a tcsh user.

Note: this will not affect the speed of "ls -l" and similar, as that
needs to make the same kind of stat calls to show the long format
information.

-- 
Kent Engström, National Supercomputer Centre
kent at nsc.liu.se, +46 13 28 4444



More information about the Bi-users mailing list