When I do an "ls -l" on the '/afs' directory, my terminal hangs. Why?
Last updated: January 22nd, 2015 03:32 PM
The information that you request with the -l or -F option when invoking
the ls command is actually kept at these remote locations. These
specific options will cause AFS processes to contact remote AFS processes
to gather statistics about the relevant directory entries. Depending on
the number of locations contacted, their distance from the local cell (in
this case, cs.pitt.edu) and the random occurrence of network failures, it
can take a very long time to complete the commands:
ls -l /afs
ls -F /afs.
If you have inadvertantly, or otherwise, executed these commmands on remote /afs entries, you can check which ls command you are using by the commmand "which ls" at a later time - you may have it aliased to one of these.
To try and abort this command is at times difficult. You can try typing ^c (control-c) to interrupt this command or, if this does not seem to work, try typing ^z to suspend this command. If this works, your prompt will come back and you will be able to type the jobs command to see the suspended job. Then type "bg" to run this command in the background, followed by "kill %" to interrupt the most recent job put in the background. This may take a moment or longer; kill will send a terminate signal to the ls process which may be too busy at the moment to catch this signal and respond right away.
If you really want to use these forms of the ls command on remote AFS sites, it is usually less frustrating to limit your inquiries to one or a few cells.