On Sun, May 18, 2025 at 19:51:04 -0400, Lee wrote: > On Sun, May 18, 2025 at 4:51 PM Andy Smith wrote: > > > > Hi, > > > > On Sun, May 18, 2025 at 12:47:25PM -0400, Default User wrote: > > > Since I know almost no shell scripting, the rsync usb drive A > > > to usb drive B copy is done with a simple bash script consisting > > > only of the rsync backup command, with options and parameters, but > > > without any code to verify that usb drive B is attached. > > > > If your backup script is a bash script then all you need do is put > > something like: > > > > if ! findmnt /mnt/usb-drive-b; then > > just out of curiosity.. why "findmnt" instead of > if [ ! -d /mnt/usb-drive-b ]; then
It will always be a directory. The question is whether there's a file system mounted on it.