-3

In general, I would like to run local programs on remote files provided to me via a distributed file system (e.g. samba, NFS or whichever you recommend), and I want to access the remote files in a way similar to accessing local files: something similar to "location transparency".

I was amazed by my file manager pcmanfm which can present remote files like local files, and allows me to run some local programs on them by right clicking in the same way of running the programs on local files.

I want to do the same in CLI shell.

For example, I am trying to copy a file to a remote directory sharesmb shared via a remote samba daemon. I can do it in my file manager pcmanfm, with address smb://olive.local/sharesmb on olive.local. I would like to do the same in shell, but the link doesn't work. Could you tell me how to do that in shell?

$ cp 153-158.pdf  smb://olive.local/sharesmb on olive.local
cp: target 'olive.local' is not a directory


$ cp 153-158.pdf  smb://olive.local/'sharesmb on olive.local'
cp: cannot create regular file 'smb://olive.local/sharesmb on olive.local': No such file or directory

Thanks.

Tim
  • 98,580
  • 191
  • 570
  • 977
  • 2
    If you want to do it the same way that your file manager is doing under the hood, it would probably involve *mounting* the remote share using a [FUSE](https://en.wikipedia.org/wiki/Filesystem_in_Userspace) based tool (possibly `gio mount` or `gvfs-mount`) and then making a local copy. For more direct methods, see [Sending files over Samba with command line](https://unix.stackexchange.com/questions/206415/sending-files-over-samba-with-command-line) for example. – steeldriver Jan 09 '20 at 01:46

1 Answers1

-1

I am still accepting replies. This is a copy of steeldriver's comment to make it less "ephemeral":

If you want to do it the same way that your file manager is doing under the hood, it would probably involve mounting the remote share using a FUSE based tool (possibly gio mount or gvfs-mount) and then making a local copy.

For more direct methods, see Sending files over Samba with command line for example.

Tim
  • 98,580
  • 191
  • 570
  • 977