If I am in a directory /foo
, and I move (from a different session) /foo
to /bar
. If I then go back to the session in /foo
and run ls
, the files are still there, and I can see new files if they are created there. Then I can execute cd .
for the current working directory to be updated in the prompt and in the output of pwd
. How does my shell know that the directory has been moved?
Asked
Active
Viewed 67 times
0

retnikt
- 319
/bar/
or/bar/foo
? In the first case it is not a move but just a rename. – Hauke Laging May 10 '20 at 19:21