...
Both the source and target directories are local (in some file system accessible directly from stampede2 lonestar6). Either full or relative path syntax can be used for both. The -avW options above stand for:
...
Tip | ||
---|---|---|
| ||
The trailing slash ( / ) on the source and destination directories are very important for rsync (and for other Linux copy commands also)! rsync will create the last directory level for you, but earlier levels must already exist. |
...
Code Block | ||||
---|---|---|---|---|
| ||||
mkdir -p $SCRATCH/data cds rsync -avWavrW $CORENGS/custom_tracks/ data/custom_tracks/ |
...
Expand | ||
---|---|---|
| ||
ls $SCRATCH/data/custom_tracks |
Now repeat the rsync and see the difference.
...
Code Block | ||
---|---|---|
| ||
rsync -avWavrW /work/projects/BioITeam/projects/courses/Core_NGS_Tools/custom_tracks/ data/custom_tracks/ |
...
Tip |
---|
The bash shell has several convenient line editing features:
|
Copy from a remote computer - scp or rsync
...
Code Block | ||
---|---|---|
| ||
cat $CORENGS/tacc/dragonfly_access.txt cds mkdir -p data/test2 scp corengstools@dragonfly.icmb.utexas.edu:~/custom_tracks/progeria_ctcf.vcf.gz ./data/test2/ lstree .$SCRATCH/data/test2 |
Notes:
- The 1st time you access a new host the SSH security prompt will appear
- You will be prompted for your remote host password
- The -r recursive argument works for scp also, just like for cp
...
- The tilde ( ~ ) at the start of the path means "relative to my home directory"
- We use the tilde ( ~ ) in the destination to traverse the ~/scratch symbolic link in your home directory.
Code Block | ||||
---|---|---|---|---|
| ||||
cat $CORENGS/tacc/dragonfly_access.txt rsync -avWavrW corengstools@dragonfly.icmb.utexas.edu:~/custom_tracks/ ~/scratch/data/custom_tracks/ |
...
Expand | ||
---|---|---|
| ||
No, because all the source files were already present in the destination directory (you copied the same files earlier) with the same names, file sizes and timestamps. So rsync had nothing to do! |
...
Expand | |||||
---|---|---|---|---|---|
| |||||
From inside your ~/what/starts/here directory:
|
...
Expand | |||||
---|---|---|---|---|---|
| |||||
From inside your ~/what/starts/here/changes directory:
The path to the directory you're in now should be: ~/what/starts/here/changes/the/world |