Search notes:

Shell command: rsync

By default, rsync compares files only by their sizes and modification times.
In order to also compare the content using a checksum, the -c flag needs to be specified.

Syncing two directories

rsync -av --delete  $SRC  $DEST
-a turns on archive mode (recursive copy and preserving certain attributes of the source).
-v turns on increased verbosity
--delete deletes files in $DEST that are not present in $SRC.

See also

The Windows command Robocopy.exe
Shell commands

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Linux/sh...', 1758200624, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Linux/shell/commands/rsync(55): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78