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?
Asked
Active
Viewed 6,567 times
6

Tomasz Kapłoński
- 153
-
Try to drag a folder out of your file manager onto the terminal. It's path should appear. – Peter Nerlich Aug 21 '15 at 10:28
-
It doesn't unfortunately... – Tomasz Kapłoński Aug 21 '15 at 10:31
1 Answers
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 ofecho $UID
). On some systems it may be the name of the user (soecho $USER
). - The subdirectories of the mounted MTP device likely will be
phone
(orInternal storage
) andSD card
(or justcard
), 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