To backup files on the local device from directory source
to destination
(if destination
does not exist, it will be created automatically) in "archive" mode (preserving permissions and timestamps) and skip files that are newer on the receiver:
$ rsync -auv source/ destination/
To perform a trial run with no changes made and show information about the changes:
$ rsync -aunv source/ destination/
--delete
destination
if they do not exist in source
--existing
source
--exclude "pattern*"
--exclude "dir/"
dir
--exclude "/dir1/**/file1"
file1
two or mode levels below a base directory called dir1
--progress
To ignore permissions:
$ rsync -aunv --no-perms --no-owner --no-group source/ destination/
To list the differences made in last commit:
git diff @~
To list the differences made in last two commits:
git diff @~2
To list the differences of the second most recent commit:
git diff @~2 @~1
$ diff -qr dir1 dir2
-q
-r
-s
$ meld dir1 dir2