Sample Header Ad - 728x90

Shell: Mounting to CWD does not update in shell session

3 votes
0 answers
52 views
When mounting a partition into my CWD (mount /path/do/devxy $(pwd)), the current shell session does not recognize it, e.g. find does not show any contents of the partition and umount $(pwd) succeeds despite me being in the directory (keeping it busy). Only after explicitly entering into the directory via cd . I can browse the files and unmounting fails. So obviously the information on the changes in my CWD is not passed on. This behaviour is very different from e.g. entering a directory in one session and creating a file into that directory from another one. In this case find's results are up to date. So how does the shell determine where it is and why is the mounting not visible immediately? Using GNU bash, version 5.0.3(1) on debian 10. ----- Considered solved: please check comments.
Asked by FelixJN (14014 rep)
May 31, 2019, 07:50 AM
Last activity: May 31, 2019, 09:32 AM