While using Rsync, a widely recognized software used for copying and syncing files both locally and remotely, you might come across an error message stating that there’s an “unknown option.” This prompt generally occurs when you inadvertently include a non-existent flag or an incorrectly typed one in your command line syntax.
Resolving ‘RSYNC: Unknown option’ errors entails rectifying the syntax of your command to ensure all options are properly recognized by Rsync. Let me provide detailed steps, sourced from credible platforms such as rsync.samba.org and linux.die.net.
1. Ensure correct command syntax
This pertains to guaranteeing the proper usage of Rsync commands. The general syntax for Rsync is:
rsync options source destinationIf you mistype an option or use one that doesn’t exist, the ‘unknown option’ error will manifest. Credible sources such as the Rsync man page provide a comprehensive list of valid Rsync options. Please cross-reference your command with the correct syntax and parameters outlined in that list.
1. Use correct dash notation
It’s vital to make sure you’re using the right dash notation. Single dash ‘-’ is used for single-letter options, while double dash “—” is meant for word options. For instance, Rsync -v (verbose mode) but Rsync —progress (shows progress during transfer).
1. Check option combinations
Sometimes, ‘unknown option’ errors occur when certain options that aren’t meant to work together are combined. Check if the options used in your command are compatible. The Rsync man page is once again a useful guide in determining valid combinations.
Examples:
Suppose you enter “rsync -zv –-dry-run /source /destination,” but you get the ‘Unknown option’ error. After consulting the Rsync man page, you find that your command has no non-existent options, and all dashes are appropriately placed. The issue could be related to option combinations; reviewing the options might reveal that ‘-dry-run’ and ‘-z’ don’t work together, causing the error.
Or, for instance, you write “rsync –-verbose /source /destination” and encounter an ‘unknown option’ error. Here, the error arises from the incorrect use of dashes; the correct notation is “rsync -v /source /destination.”
In summary, scrutinize your command line syntax for typographical errors, verify your dash notation, and ensure your options can function together. Always refer to authoritative sources such as the Rsync man page on linux.die.net for a detailed list of usage options, syntax, and examples.
Sources:
1. Rsync official page – https://rsync.samba.org/
2. Rsync Man page – https://linux.die.net/man/1/rsync