0

How can I copy a file from a local directory to an online cluster, while I'm logged in the cluster? Let say I'm currently at

online-user@ldas-grid

which pwd gives me

/home/online-user

and I want to copy a file to above mentioned online cluster from a local folder at

offline-user@my-pc-name

which pwd gives me

/Users/offline-user

Rotail
  • 1,025
  • 4
  • 19
  • 40

1 Answers1

4

simply scp file online-user@ldas-grid: will copy file file from your current directory to your home directory on the cluster.

  • Copy from local to cluster while connected on local: scp file online-user@ldas-grid:
  • Copy from local to cluster while connected on cluster: scp offline-user@my-pc-name:file .
  • Copy from cluster to local while connected on local: scp online-user@ldas-grid:file .
  • Copy from cluster to local while connected on cluster: scp file offline-user@my-pc-name:

Alternatively, you can use rsync.

See

  • man scp
  • man rsync

for more information

damienfrancois
  • 52,978
  • 9
  • 96
  • 110
  • Sorry to be too naive but I don't know how can I get back to my local home from the cluster. – Rotail Nov 13 '13 at 21:11
  • And another thing, suppose that I want to copy a file from local to cluster while I'm on the cluster. How can I do this? – Rotail Nov 13 '13 at 21:16
  • To exit an ssh session, hit control-d, type exit or type logout. It depends, a little bit, on what shell you're in, but one of those 3 should work. – dstromberg Nov 13 '13 at 21:32
  • To pull data from your desktop to the cluster, initiated from the cluster, you need to know the hostname of your desktop. Then: "scp desktop.host.name:~/file-name ." – dstromberg Nov 13 '13 at 21:32
  • This answer doesn't work for me. I'm looking for somrthing with gsiscp. – Rotail Nov 14 '13 at 21:38