rsyncing files based on size
I am trying to rsync files with the extension *.scala and only those no other files between two directories. If the size is different they should be synced. I am executing this command and seeing no scala files being synced even though I know the sizes are different.
rsync -rnvh --ignore-times --size-only --include '*/' --include '.scala' --exclude '*' /home/salilsurendran/code/servlet-app /home/salilsurendran/code/sbt-runs/servlet-app/ With the -n option I am doing a dry run and the output prints out a bunch of directories but not any files. Please help |
rsync checks file timestamps & sizes by default.Are you content to update new files with old?. If you intend
rsync [options] dirA dirB I would start by copying dirB to dirC, & run time rsync -a dirA/filespec dirC, and see what went wrong. Then use options to correct errors |
I am no expert, but it seems to me that if you put --include '.scala' and then follow that with --exclude '*' you are excluding all files.
Why would you need --exclude '*' ? If you want to include all files with the extension .scala then you would put --include '*.scala' - right? |
you can try a lot of options (of rsync), like:
Code:
-i, --itemize-changes |
All times are GMT -5. The time now is 07:29 PM. |