-n or --dry-run: This option simulates the operation without making any changes, which is useful for seeing what files are missing in the destination.
-av: This combines -a (archive, which preserves almost all file attributes and copies directories recursively) and -v (verbose, to provide detailed output).
–delete: This option shows which files would be deleted in the destination directory to make it match the source. Since we are using --dry-run, no files will actually be deleted.
This command will output a list of files that are present in the source but missing in the destination, as well as files that would be deleted in the destination to match the source.
Remember to replace source_directory/ and destination_directory/ with your actual directory paths.
rsync -n -av --delete source_directory/ destination_directory/
Here’s a breakdown of the command options:
-n or --dry-run: This option simulates the operation without making any changes, which is useful for seeing what files are missing in the destination.
-av: This combines -a (archive, which preserves almost all file attributes and copies directories recursively) and -v (verbose, to provide detailed output).
–delete: This option shows which files would be deleted in the destination directory to make it match the source. Since we are using --dry-run, no files will actually be deleted.
This command will output a list of files that are present in the source but missing in the destination, as well as files that would be deleted in the destination to match the source.
Remember to replace source_directory/ and destination_directory/ with your actual directory paths.