When working with remote filesystems such as
smbfs, it is command that they become stale due to network problems. To check if the mount is stale or not, I usually use the command
ls to see if I can list the contents of the remote mounts. When these remote mounts are stale, the
ls command just waits for a long time until outputting, after some minutes, something along the lines of:
ls: cannot access '/mnt/remote': Input/output error
Instead of waiting for this error, is there a way to stop the
ls command from within the same bash session? The regular Control+C does not seem to do the job. Closing the bash shell works, but this is undesirable. Any alternatives?