First, locate
does not auto-update itself; you must run updatedb
periodically to get the current list of files. For optimal speed and usability, add the --prunepaths
and --prunefs
switches.
Second, try echo $PATH
to see the current path, and call ls
with a fully-qualified pathname: /bin/ls -l
I suspect ls
is set to an invalid alias or internal function (bad command parameters). Check the contents of ~/.bash_profile, ~/.bashrc, and ~/.profile .