Take the 2-minute tour ×

I was wanting to know the best or preferred way to move files from one computer to a networked hot folder. I have looked at mv and cd but all the references discuss using it locally. I would need to add this to some already existing scripts. Also, upon reading I did see SSH File Transfer Protocol and SFTP but everything pointed to a manual process.

Referenced: here and here

EDIT: and the mapped network folder is windows based if that helps.

share|improve this question
mounted remote filesystems are treated the same as any other local filesystem thanks to VFS. –  jordanm Dec 12 '12 at 20:02
@jordanm so basically I need to mount the networked drive as a local drive in ubuntu?? –  Gramps Dec 12 '12 at 20:09
yes, see man mount.cifs. –  jordanm Dec 12 '12 at 20:20
add comment

1 Answer

up vote 1 down vote accepted

On unix systems, the normal way to access files is to mount the location that contains them. Files thus appear at some point in the directory hierarchy, under the directory that is the mount point for the filesystem that contains them.

There are several ways to access files on another computer, depending on which protocol is used to authenticate and transfer data. For a “networked folder” that operating systems such as Windows use, the protocol is SMB, usually known in the unix world as Samba (which is the name of the Linux implementation of the protocol). The easiest way to mount a Samba volume is with a GUI: use a menu item like “open network location” (or similar wording) in file browsers such as Nautilus, Konqueror, etc. You can also mount a Samba volume on the command line, with mount.cifs (requires root permissions on some platforms) or gvfs-mount (from the Gnome virtual filesystem tool suite) or smbnetfs.

You can also access remote files over Samba without mounting using a program dedicated to network transfers, such as smbclient (part of the Samba tool suite).

If the remote machine is also a unix machine, it may be easier to set up access with SSH. If you can run commands on the other machine with SSH, you can use scp or sftp to transfer files. You can also use sshfs to mount the remote location over the SFTP protocol. This is a completely different protocol: ssh talks to an ssh server, Samba talks to an SMB server.

share|improve this answer
add comment

Your Answer


