Copying Files To/From a Linux/MacOS desktop
There are a number of ways to copying files and directories using Linux command line.
you can copy your data from any Linux device to Viking using the following commands
Here are a couple of examples.
scp
This is recommended for a small number of files.
You wish to copy your data from local machine to your scratch area on Viking. Run the following commands on your local machine in the terminal.
[bash-4.1]$ #For an individual file
[bash-4.1]$ scp afile abc123@viking.york.ac.uk:~/scratch
[bash-4.1]$ #For a folder with lots of files
[bash-4.1]$ scp -r adir abc123@viking.york.ac.uk:~/scratch
What if you want to copy files from your scratch area on Viking to your local machine? Run the following commands on your local machine.
[bash-4.1]$ #For an individual file
[bash-4.1]$ scp abc123@viking.york.ac.uk:~/scratch/afile .
[bash-4.1]$ #For a folder with lots of files
[bash-4.1]$ scp -r abc123@viking.york.ac.uk:~/scratch/adir .
There are many options you can use with scp. To view these options either run
on the device you are using scp on or have a look at this scp wiki page.
RSYNC
Rsync is another command that will let you copy files and folders to the Viking. If you have a large number of files it is always best to use Rsync.
To copy a folder adir from your local machine to your scratch area on Viking, run the following command on your local machine.
[bash-4.1]$ rsync -avz adir abc123@viking.york.ac.uk:~/scratch
There are many options you can use with rsync. To view these options either run
on the device you are using rsync on or consult the rsync webpage.
See /wiki/spaces/RCS/pages/39159310 for more information.