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.
--
Please do not CC me for listmail.
👱🏻 Jonathan Dowland
✎ j...@debian.org
🔗 https://jmtd.net