[Bi-users] Automatic colouring for ls turned off
Falahat Saeed
saeed.falahat at smhi.se
Thu Apr 28 10:10:50 CEST 2016
Hi
Thanks for this interesting information. I just would like to add one point. By using \ls we can temporarily remove default alias associated with ls. So basically by just adding backslash (\) before ls we remove the default alias associated with the color.
Best
Saeed
________________________________________
From: bi-users-bounces at lists.nsc.liu.se [bi-users-bounces at lists.nsc.liu.se] on behalf of Kent Engström [kent at nsc.liu.se]
Sent: 28 April 2016 09:57
To: bi-users at lists.nsc.liu.se
Cc: bi-admin at nsc.liu.se
Subject: [Bi-users] Automatic colouring for ls turned off
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
_______________________________________________
Bi-users mailing list
Bi-users at lists.nsc.liu.se
https://lists.nsc.liu.se/mailman/listinfo/bi-users
More information about the Bi-users
mailing list