Last active
June 14, 2024 11:28
-
-
Save gartenfeld/aa720435f11a59eb1ebf39cf533203eb to your computer and use it in GitHub Desktop.
Downloading section JSON data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First, set up ssh for Puhti | |
# Use ssh-copy-id to add your key | |
ssh-copy-id [email protected] | |
# This way, you don't have to type your password for every command | |
# Make a .txt file with one file name (relative) per line | |
# Copy this file to remote | |
scp ./download_list.txt [email protected]:. | |
# Log in | |
ssh [email protected] | |
# Copy JSON data files from remote to remote | |
# Where {} is the placeholder to be replaced | |
# Run this from SSH terminal | |
cat download_list.txt | xargs -I {} scp [email protected]:/scratch/project_number/relative/path/{} ./relative/path/ | |
# Still on remote, make a dir | |
mkdir your_remote_dir | |
# Zip it up | |
zip -r zip_filename.zip relative/path | |
# This may take a while | |
# Back in local terminal, download the zip file | |
scp [email protected]:/users/yourusername/path_to_zip_filename.zip . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment