Assuming you're using bash, pwd
is showing you the value of the PWD
environment variable, which is updated when you change directory with cd
. The folder1
directory changing name does not cause bash to update PWD
. However you can find evidence that the directory has changed name:
pwd -P
will show the new name of the directory.ls -l /proc/self/cwd
will link to the new name.