Bug 12386 - Copy Loop
Copy Loop
Status: RESOLVED INVALID
Product: rsync
Classification: Unclassified
Component: core
3.1.3
All All
: P5 normal
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-21 06:09 UTC by Crysanthus Silva
Modified: 2016-10-21 21:36 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Crysanthus Silva 2016-10-21 06:09:05 UTC
If you use .* as a rsync source it will be looped until end of disk

ie.
rsync -rvhIW crp/.* rohanamobile/public/
Comment 1 Kevin Korb 2016-10-21 06:12:10 UTC
That isn't a bug you are using it wrong.  drop the .* and it will do what you expect.  There should almost never be a * in the source parameter.

Also, don't rsync without --times unless you have a really good reason.
Comment 2 Wayne Davison 2016-10-21 21:36:34 UTC
You'd probably be better served by asking about something like this on the mailing list, as there is no issue with .* concerning rsync -- this is entirely a shell issue.

In this instance you're probably using bash, which is so stupid that it expands ".*" to include "..", which is obviously not what you want.  I personally use zsh, which doesn't have this issue.

When using bash, you could instead try a "path/.??*" (if all your dot files are at least 2 chars after the dot) or something like ".[a-z]*" (though you might also need A-Z and 0-9 etc added).