miamondo

rsync.sh

Dec 23rd, 2021 (edited)
1,275
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. # Copyright © 2021 Benoît Boudaud <https://miamondo.org/contact>
  4. # This program is free software: you can redistribute it and/or
  5. # modify it under the terms of the GNU General Public License as
  6. # published by the Free Software Foundation, either version 3 of
  7. # the License, or any later version. This program is distributed
  8. # in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  9. # without even the implied warranty of MERCHANTABILITY or FITNESS
  10. # FOR A PARTICULAR PURPOSE. See the GNU General Public License
  11. # for more details. You should have received a copy of the GNU
  12. # General Public License along with this program.
  13. # If not, see <http://www.gnu.org/licenses/>
  14.  
  15. # ---------------------------------------------------------------------------
  16.  
  17. # This script takes one parameter which is the last number of the IP-address
  18.  
  19. # ---------------------------------------------------------------------------
  20.  
  21. rsync -avz --delete-after ~/Documents $USER@192.168.178.$1:~
  22. rsync -avz --delete-after ~/Images $USER@192.168.178.$1:~
  23. rsync -avz --delete-after ~/Musique $USER@192.168.178.$1:~
  24. rsync -avz --delete-after ~/Videos $USER@192.168.178.$1:~
RAW Paste Data