Multiple choice technology operating systems

I am in a directory /tmp/test. $ pwd /tmp/test Now I deleted this directory from another session and fired the command pwd on the previous session. What will be the output of the pwd command?

  1. /tmp/test

  2. Directory does not exist

  3. /tmp

  4. None of these

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The pwd command displays the current working directory path that the shell has stored in its internal context. When you delete the directory from another session, the original shell session still retains knowledge of its previous working directory path, so pwd continues to show /tmp/test. The shell does not continuously validate whether the directory still exists on the filesystem.