6

I have connected a smartphone and would like to copy some file onto it using midnight commander. I've found out that the mount point is mtp://[usb:002,004]/Card/ however when I try to run cd mtp://[usb:002,004]/Card/ I get No such file or directory. How should I point to it in terminal?

1 Answers1

8

I think this has two main problems:

  • It won't understand the path mtp://[usb:001,009]/SD%20card

  • It likely won't want to use [, ,, ] etc in the path name - spaces may cause issues as well.

On my system, mtp://[usb:001,009]/SD card/ shows up as this in terminal:

/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C009%5D/SD card

So for your device you will likely have to do:

cd "/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C004%5D/"

Where:

  • Its in quotes so it can do the name with the space.
  • The 1000 (probably) is User ID - you may have to replace it with ${UID} (or just the value of echo $UID). On some systems it may be the name of the user (so echo $USER).
  • The subdirectories of the mounted MTP device likely will be phone (or Internal storage) and SD card (or just card), depending on your setup.
Wilf
  • 30,194
  • 17
  • 108
  • 164
  • It works but still I cannot copy by MC because of operation not supported... a pity because graphical file manager hangs when I try to copy big file. I'll try later from different system. Thanks, anyway – Tomasz Kapłoński Aug 21 '15 at 11:16