diff.rst 824 B

123456789101112131415161718192021222324252627282930313233343536
  1. .. include:: diff.rst.inc
  2. Examples
  3. ~~~~~~~~
  4. ::
  5. $ borg init -e=none testrepo
  6. $ mkdir testdir
  7. $ cd testdir
  8. $ echo asdf > file1
  9. $ dd if=/dev/urandom bs=1M count=4 > file2
  10. $ touch file3
  11. $ borg create ../testrepo::archive1 .
  12. $ chmod a+x file1
  13. $ echo "something" >> file2
  14. $ borg create ../testrepo::archive2 .
  15. $ rm file3
  16. $ touch file4
  17. $ borg create ../testrepo::archive3 .
  18. $ cd ..
  19. $ borg diff testrepo::archive1 archive2
  20. [-rw-r--r-- -> -rwxr-xr-x] file1
  21. +135 B -252 B file2
  22. $ borg diff testrepo::archive2 archive3
  23. added 0 B file4
  24. removed 0 B file3
  25. $ borg diff testrepo::archive1 archive3
  26. [-rw-r--r-- -> -rwxr-xr-x] file1
  27. +135 B -252 B file2
  28. added 0 B file4
  29. removed 0 B file3