View Full Version : [SOLVED] how do I use file URIs in the terminal?

July 28th, 2011, 09:59 PM
if I have a file URI like this:


how can I use them in the terminal (or script) with commands like mv and cp?

July 28th, 2011, 10:19 PM
You can't. mv and cp work on filesystems, and on nothing else. What you can do is mount the Samba share as a fiesystem with smbfs, then you can use mv and cp on it, but you will use the filesystem paths, not the smb:// addresses.

July 28th, 2011, 10:27 PM
smb:// file:// http:// ftp:// are ALL types of communication protocols. Most web browsers and many file managers can translate the protocols. Unfortunately, your shell interpreter cannot.

July 28th, 2011, 10:29 PM
ok, so are you saying the only way to use a file URI in the terminal would be to parse that URI and find the equivalent folder in:

?? seems a bit long winded....

July 28th, 2011, 10:48 PM
Take a look at 'man scp' it is a secure copy command that can handle ports.

You really don't want to move 'mv' files across different filesystems, it is just too risky.

July 29th, 2011, 10:27 PM
I found the answer

sudo apt-get install gvfs-bin


gvfs-copy "source" "destination"

quotes around the source and target so bash doesn't parse the ';' if present