exclude parameter of rsync- 'dir' vs "dir" vs dir
If I use --exclude option in rsync, what is the difference in following 3 forms?
Code:
--exclude='dirname' Thanks for your help. |
this is probably evaluated by the shell not by rsync, so I'm not sure.
__________________________________ Happy with solution ... mark as SOLVED If someone helps you, or you approve of what's posted, click the "Add to Reputation" button, on the left of the post. |
Strings in single quotes are not parsed by the shell, so if you use variables in your exclude string they will not be expanded.
Double quotes will allow the use of spaces in filenames, variables will be expanded by the shell, as well as globs. using no quotes at all has the same effect as using double quotes, but filenames with spaces aren't allowed. |
Thanks.
That means * works equally well in all forms. |
No, I should have explained that in more detail. If you use single quotes the shell will not touch the string and make no expansions. This does not only apply to variables, but also to globs, like *.
|
Thanks for explaining. I used it and was able to complete the process successfully without losing any data.
|
All times are GMT -5. The time now is 10:20 AM. |