HPC IO

Downloading and uploading files from HPC cluster

1 Local workspace

Start by creating a folder on your laptop where the files that you will download should end up. You need to have write permission in this folder. This folder will be referred to as your local workspace throughout these instructions.

Open a terminal window on your laptop and move into your local workspace.

2 Download a file from HPC

Lets assume that you have a file “results.txt” in the following folder on HPC:

~/ngsintro/somefolder/
Note

username and somefolder should be replaced with your real username and a real folder name. Run this in a LOCAL terminal.

To download the file to your local workspace type:

scp username@dardel.pdc.kth.se:~/ngsintro/somefolder/results.txt .

Note that the last . means that the file will keep the original name.

3 Upload a file to HPC

Now lets imagine that you have developed a script on your laptop and want to upload it to HPC. The script is stored in your local workspace and is called “script.sh”. Type this in your local workspace to upload the file to HPC:

Note

username and somefolder should be replaced with your real username and a real folder name. Run this on HPC.

scp script.sh username@dardel.pdc.kth.se:~/ngsintro/somefolder/.