On Fri, Jun 18, 2021 at 3:35 PM, Rich Shepard <rshep...@appl-ecosys.com> wrote:
> On Fri, 18 Jun 2021, John Jason Jordan wrote: > > > I mount a removable drive at a folder in my root drive. I copy files to > > it. I umount the drive and unplug it. Later, with the removable drive not > > even plugged in I look at the folder where I mounted it, and there are > all > > the files that I thought I was copying to the removable drive. > > John, > > Are you familiar with the PWD environment variable? At the shell prompt > type > $ echo PWD > and the present working directory will be displayed. > > Using this after cd'ing to your multiple directories with the same files > might provide you with insights into what's happening. > > HTH, > > Rich A habit I got into many years ago was to change the permissions to zero (0) on folders that were mount points. For example: mkdir -p -m 0 foo sudo mount /dev/sdd foo This would prevent me from inadvertently writing files into the mount point folder if the mount command failed and I didn’t notice. Good luck and let us know what you discover. Regards, - Robert