10 hours ago
Not sure on how to phrase the question easily.
I have a directory /mnt/bla in it MAYBE I have many files and directories.
/mnt/bla
On top of that directory, I mounted some nfs mount.
Is there a way to check if there are files in the directory underlying the mount without unmounting it?
24 hours ago
You can do so using a bind-mount. First you need to create a directory which we use as mount point for the bind-mount:
sudo mkdir /mnt/mymountpoint
(We cannot use /mnt here as suggested in the links in the comments since you have a filesystem mounted on /mnt/bla)
/mnt
Next step:
sudo mount --bind / /mnt/mymountpoint
Browse to /mnt/mymountpoint/mnt/bla to see what's in the folder. What you see here is the content of /mnt/bla as if nothing were mounted to it.
/mnt/mymountpoint/mnt/bla
Move the content of /mnt/mymountpoint/mnt/bla to the location you want or remove the content completely.
Unmount the bind-mount with
sudo umount /mnt/mymountpoint
and remove the mountpoint with
sudo rmdir /mnt/mymountpoint
That's it.