Re: Problem with ls on home directory



Floyd L. Davidson wrote:

Geico Caveman <spam@xxxxxxxxxxxx> wrote:
Hello,

I am facing strange problems with running ls on my home directory. I issue
ls, it sits and waits around for 2-5 minutes before it responds. The same
happens when I try to do any file operations with other applications (like
attaching something to my email). Its almost as if it is timing out for
something. This does not happen anywhere else down the directory tree.

To find out what was going wrong, I issued strace ls, which ran
immediately.

What do I check ?

Find out *exactly* what you are running! (The rest of this
assumes you are using bash as a login shell.)

First, do "whereis ls", and see if the first item listed
is /bin/ls, or something else. (If it is something else, your
PATH variable is set incorrectly, and whatever it is you are
running is probably a trojan. Specifically if there is an
executable named ls in your home directory, your PATH is
wrong and you've been hacked.)

Then do "alias ls", and see if you have an alias named ls. If
so, "unalias ls" to get rid of it, and then see what you have.

Then do "command ls", and see if that runs properly. It will
run the first ls found with the "whereis ls" command above.
What it will *not* do is run a shell function named ls. If just
"ls" does something different than "command ls", look to see
where you are defining a shell function for ls.



Thanks for the informative response (unlike my incomplete initial post). I
am running Debian testing and bash. whereis ls reveals :

$ whereis ls
ls: /bin/ls /usr/share/man/man1/ls.1.gz

I do have an alias definition :


alias ls='ls --color=auto'

Anyways, I figured out what was going wrong. On a hunch, I opened another
terminal and deleted a soft link to an AFS mountpoint I had defined. ls is
now back to normal. I still do not know how it was screwing up, but at
least I know now what was screwing up.
.



Relevant Pages

  • Re: Problem with ls on home directory
    ... I am facing strange problems with running ls on my home directory. ... Then do "command ls", and see if that runs properly. ... run the first ls found with the "whereis ls" command above. ... What it will *not* do is run a shell function named ls. ...
    (comp.os.linux.misc)
  • Re: move your home directory - second newsgroup post
    ... OS X puts all data into the users home directory ... I tried to delete the entries that I added in the preference pane ... as I'm not positive how OS X refers to those ... A Mac alias is different, ...
    (comp.sys.mac.misc)
  • Re: matlab and .bashrc
    ... However it works when I run it form the path where matlab is ... From what you set in the alias it seems ... home directory. ... in under your normal account, ...
    (comp.unix.programmer)
  • Re: How to remove all subdirectory/file under current directory ?
    ... I have alias for  rm='rm -ie'. ... Thank for your suggestion. ... e.g. tar some directory, I just want tar my home directory and shell ...
    (comp.unix.shell)
  • Nigel releases shorter home command under gpl
    ... Mike Cox wrote: ... > you've been wandering far, and don't want to type so ... alias home='cd $HOME' ...
    (comp.os.linux.misc)