0

I read the below question, but I cant find the answer according to my need as the answer is for windows based systems.

Full URI to a file on another machine in our local network?

I need to know that is there a way, I can give the path of the file on another linux system. Im writing a shell script, and I need to access a file from another system.

harmands
  • 101

1 Answers1

0

It really depends on how the next filesystem is visible from yours.

In general under Linux for file sharing you would use NFS in which case you will not see any difference to a local file. So after doing the mount with something like:

mount -t nfs remote.host.com:/remote/shared/directory /my/local/mountpoint

You will just have to access files in /my/local/mountpoint as if they were local files.

If the shared directory is shared via Samba/CIFS (that is Windows-like file sharing) then even the syntax in the link you provide will be fine as you'll see the Linux server as a Windows server.

fede.evol
  • 1,918
  • 1
  • 12
  • 6
  • mount: wrong fs type, bad option, bad superblock on \xxx.xxx.xxx.xxx:/remote/shared/directory, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount. helper program) In some cases useful info is found in syslog - try dmesg | tail or so – harmands Mar 21 '14 at 06:35
  • And yes, im using the IP address of the remote system – harmands Mar 21 '14 at 06:38
  • That first "\" is wrong, check my example. Otherwise it will suppose you're trying to mount Samba. Also on the server side you have to configure the export and so on. – fede.evol Mar 21 '14 at 08:09