Why do I get a train when I run 'ls'?
I have recently noticed something odd that I don't like very much:
So why am I getting a train upon running ls
? And how can I stop this and make it behave normally? Is this an Easter Egg that I have discovered? I am running Ubuntu GNOME 15.04.
Information Update:
Running which ls
gets me the same train, and running ls -l $(which ls)
just gets me another type of train.
Running command -v ls
outputs nothing. And running command -v sl
also outputs nothing.
This may all have something to do with the cow
(or something like that) package that I recently installed that promised to 'lighten things up a little'.
Solution 1:
-
Try to remove the funny package via
sudo apt-get purge sl
Check your aliases for
ls
e.g. in your~/.bashrc
or~/.profile
.-
Check the binary
/usr/games/sl
and deletesudo rm /usr/games/sl
-
Check the output of
strace sl |& grep execve strace ls |& grep execve
if point three has no success.
And in future, do NOT install anything that promises to 'lighten things up a little' in the description. ;)
Solution 2:
Generally, you can prepend \ to a command to disable aliasing only for that instance of the command run. E.g.,
[2023]$ alias ls alias ls='ls -F -Chs --color=tty' [2024]$ ls total 140K 4.0K bin/ 0 Downloads@ 0 prog.git@ ... [2025]$ \ls bin Downloads doc.git freertos.git prog.git tmp ...
So, I recommend trying your ls with a prepended '\'
Next, you can try running the ls command directly with full path.
/bin/ls
Next, command /bin/ls
also, check your path,
echo $PATH make sure that /bin is the first entry. $PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin:usr/local/sbin:/usr/local/bin
But, I believe that removing cow
would help.