Advertisement
sebbu

backup docs perso

Oct 2nd, 2024
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.65 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. comment="Document $(date +%Y%m%d-%H%M%S)"
  3. file=${comment}.rar
  4. echo -n ${comment} > commentaire.txt
  5. touch liste.txt
  6. find . -maxdepth 1 -type f | cut -b 3- | sort -f -V > liste.txt
  7. rar a "${file}" -k -rr -p -hp -m5 -r- -s- -scFcgl -z"commentaire.txt" @"liste.txt"
  8.  
  9. comment2="SebastienDocument $(date +%Y%m%d-%H%M%S)"
  10. file2=${comment2}.rar
  11. echo -n ${comment2} > commentaire2.txt
  12. touch liste2.txt
  13. find Administratif/ "emploi Sebastien"/ SEBASTIENdocuments/ commentaire2.txt liste2.txt keys/ "old mdp"/ -maxdepth 1 -type f | sort -f -V > liste2.txt
  14. rar a "${file2}" -k -rr -p -hp -m5 -r- -s- -scFcgl -z"commentaire2.txt" @"liste2.txt"
  15.  
Tags: Backup Script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement