On Tue, May 20, 2025 at 09:30:37AM -0400, Lee wrote:
> On Tue, May 20, 2025 at 6:00 AM Jonathan Dowland wrote:
> >
> > On Tue May 20, 2025 at 6:41 AM BST, Kamil Jońca wrote:
> > > why not
> > > if ! mountpoint  /mnt/usb-drive-b ; then ...
> > > ?
> >
> > I'd not heard of either `mountpoint` or `findmnt` before. I see they're
> > both part of util-linux, so I guess as likely as each other to be
> > available (which is one criterion I would use for choosing)
> >
> > The approach I would have used (and it's not infallible) is
> >
> >         test -f /mnt/usb-drive-b/.some-file
> >
> > where '.some-file' exists on the device but not on the empty mount
> > point.
> 
> If we're continuing this thread, why would one want to use
> /mnt/usb-drive-b for mounting a usb drive instead of automatically
> mounting to
> /media/$USER/filesystem-UUID ?

What do you do if you get two USBs containing file systems with
the same UUID?

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature

Reply via email to