|
6 | 6 | name="viewport" |
7 | 7 | content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" |
8 | 8 | /> |
| 9 | + |
9 | 10 |
|
10 | 11 | <title>Bash - Shell Scripting Commands & Examples</title> |
11 | 12 |
|
@@ -1613,17 +1614,29 @@ <h2>rsync</h2> |
1613 | 1614 | # rsync version 3.4.1 protocol version 32 |
1614 | 1615 | # ... and more |
1615 | 1616 | # for copying from local drive to external ssd over the usb |
1616 | | - rsync -a --info=progress2 source/ /Volumes/YourSSD/destination/ |
| 1617 | + rsync -a --info=progress2 /source/ /destination/ <---------------------- |
1617 | 1618 | # don't use -P - too much info about progress (for example it will show progress for each file - you want overall progress) stick to suggeststed progress2 |
1618 | 1619 | # don't use -z for usb transfer, slows things down - compression and decompression - there is no point for that in here - only via network |
1619 | 1620 | # VERY IMPORTANT: remember about / at the end of each path - rsync funky issue |
1620 | 1621 | # VERY IMPORTANT: remember about / at the end of each path - rsync funky issue |
1621 | 1622 | # VERY IMPORTANT: remember about / at the end of each path - rsync funky issue |
1622 | 1623 | # VERY IMPORTANT: remember about / at the end of each path - rsync funky issue |
1623 | | - rsync -a --info=progress2 ~/Desktop/ /Volumes/M2_NVMe_2TB/2026-04-15-mac14rebuild/Desktop/ |
1624 | | - rsync -a --info=progress2 /Users/szdz/Workspace/ /Volumes/M2_NVMe_2TB/2026-04-15-mac14rebuild/Workspace/ |
1625 | | - rsync -a --info=progress2 /Users/szdz/Dropbox/ /Volumes/M2_NVMe_2TB/2026-04-15-mac14rebuild/Dropbox/ |
1626 | | - rsync -a --info=progress2 /Users/szdz/Torrent/___already_on_sd/ /Volumes/M2_NVMe_2TB/2026-04-15-mac14rebuild/___already_on_sd/ |
| 1624 | + # additionally we can use also: |
| 1625 | + --partial -- will leave interrupted partial files like .filename.8u3k2.tmp |
| 1626 | + then we can continue with --append-verify |
| 1627 | + also there is --inplace which will not copy to partial files .filename.8u3k2.tmp |
| 1628 | + but regarding partial it is just best to add together either |
| 1629 | + --partial --append-verify |
| 1630 | + or |
| 1631 | + --partial --append-verify --inplace |
| 1632 | + but all that is just more sophisticated mode when interruptions are anticipated |
| 1633 | + for any other normal case stick to : |
| 1634 | + rsync -a --info=progress2 /source/ /destination/ |
| 1635 | + or |
| 1636 | + rsync -a --info=progress2 --delete /source/ /destination/ |
| 1637 | + that is all you will ever need for 99% cases |
| 1638 | + |
| 1639 | + |
1627 | 1640 |
|
1628 | 1641 | # WARNING: MORE MODERN ALTERNATIVE: rclone https://github.com/rclone/rclone |
1629 | 1642 |
|
|
0 commit comments