1

I am using a raspberry PI. I want to create a USB bridge, meaning I can transfer the files from one USB to another automatically.

My problem is finding the specific USB I want to take the files from, and the USB I want to send them to. I've looked at all sorts, from lsblk which outputs the directory of the USB really nicely, i.e. /media/pi/, but if I have two USB's in, I don't know which one is the source and which one is the target.

If the device names were static, this would be fine, but the plan here is to be able to plug any two USB's in, and the source will always transfer to the target.

Basically I want to label one of the physical USB ports as the IN, and the other as the OUT, and anything on the IN gets transferred to the OUT.

To do this I need to:

  1. Find the files on the device plugged into the IN port
  2. Find the device plugged into the out port
  3. Move the files from the in port to the out port.

If I can find a way to do this, I can automate it.

  • See here for ways to find out what sd* device file corresponds to what port. – novice Jan 13 at 1:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.