Home > Blockchain >  Cding into directory hangs terminal
Cding into directory hangs terminal

Time:06-16

I am encountering a really weird issue when trying to "cd" into a specific directory (e.g. directory_A) along a path. Whenever I try to "cd", my linux terminal immediately hangs for at least 1hr. Upon entering successfully, the terminal is completely frozen and I cannot run any commands within the shell.

Additionally, while exiting the "cd" command during execution through "ctrl-c" does kill the "cd" call, it becomes impossible to run any additional command within the shell (i.e. "ls/cd/etc.." into directory_B causes the terminal to hang again). This happens despite the fact that cding into directory_B (without first trying to cd into directory A) causes no issues whatsoever. It appears that trying to enter directory_A at all causes immediate failure of the shell somehow.

What is more is that "lsing" directory A from its parent dir causes no issues. I can see all the files (and even open them! - e.g. through "vim directory_A/foo.txt), but "cding" causes massive problems.

I'm not sure if I just have the wrong keyword searches, but I haven't been able to find similar issues - though I acknowledge I am far from an expert with these things.

Has anyone seen such an issue before? Or may know potentially where to search for potential answers?

I'd be happy to provide any other information as well - thanks very much for any help/advice you may have!

CodePudding user response:

A) type alias | grep cd to see if its aliased, or type cd to check wether its been re-defined as a function.

B) start a new shell without startup file: bash --noprofile --norc

C) use a different shell: sh, or whatever

  • Related