On Mon, Dec 24, Erik Jakobsen wrote:
On Monday 24 December 2001 17:54, Togan Muftuoglu wrote:
* Erik Jakobsen;
on 24 Dec, 2001 wrote: Hi Jon.
Could you give me an example how I shall copy files from "pentium" to "linux" (both are computers here).
scp file_tobe_copied user@linux:/path_to_be copied
What does file_tobe_copied means ??.
scp /etc/ax25/fbb/fwd root@pentium:/etc/ax25/fbb/fwd
Is this sequence right ??.
Yes, assuming that the 'fwd' is the file you want to send over the wire and that 'pentium' is the destination machine. Think of it as doing 'cp' over the network, where you specify the dest machine as well as the dest directory and filename. Works the same in reverse, as well: scp user@othermachine:/etc/foobar.conf . # brings /etc/foobar.conf to your current directory on local machine Note that doing 'destmachine:' alone, as the final argument will assume that the file is going to the home directory of the user you are currently logged in as on the source machine. Of course, that only works if you have a same-named user on both boxes, but it is a nice shortcut if you do. List of stupid gotchas: * Not having write permissions to dest, as pointed out before * Forgetting the ':' after the dest machine name. * Having 'fortune' or some other program which produces output on the dest machine login shell -- this is really annoying as it will hose scp but not ssh. * Forgetting user@ on the dest machine argument when you don't have a user with the same name on that machine. Enjoy. Michael -- Michael Fischer 7.5 million years to run michael@visv.net printf "%d", 0x2a; -- deep thought
scp /etc/ax25/fbb/fwd root@pentium:/etc/ax25/fbb/fwd
Is this sequence right ??. Yes, assuming that the 'fwd' is the file you want to send over
On Mon, Dec 24, Erik Jakobsen wrote: the wire and that 'pentium' is the destination machine.
Think of it as doing 'cp' over the network, where you specify the dest machine as well as the dest directory and filename. Works the same in reverse, as well: scp user@othermachine:/etc/foobar.conf .
In case you don't like the syntax of scp, you can always use sftp. I like sftp, it's a little more staright forward with directories. cd, pwd for remote and lcd, lpwd for local you just keep track of changing directories on local and remote, just like ftp.
participants (2)
-
Michael Fischer
-
zentara