I am facing some issues concerning the mounting process of usb drives. What i want to have in the end is, that i am connecting the usb drive to the pi and pressing a button to start a procedure to copy a folder from the pi to the usb drive. So with the button being pressed i mount the usb drive, then copy the register and umount it afterwards. The thing i would like to achieve is to be able to use any usb drive and not just a specific one. To be precise: i am looking for a command like
mount /dev/sd* /mnt
so the pi will just mount anything it finds and not just the sda1 as it is doing with the code i am running right now. Below you'll find my code:
sudo mount /dev/sda1 /mnt sudo cp -r /home/pi/... /mnt sudo umount /mnt
Thank you for your help!