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/
--deletedestination if they do not exist in source--existingsource--exclude "pattern*"--exclude "dir/"dir--exclude "/dir1/**/file1"file1 two or mode levels below a base directory called dir1--progressTo ignore permissions:
$ rsync -aunv --no-perms --no-owner --no-group source/ destination/
Set permissions for copying from Windows to Linux:
$ rsync -auv --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r source/ destination/
Sync files modified in the last 7 days:
find ~/myGit/soft -type f -mtime -7 -printf %P\\0 | rsync -auv --files-from=- --from0 ~/myGit/soft ~/shm/soft/
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