Skip to content

Instantly share code, notes, and snippets.

@rponte
Last active February 23, 2023 09:30
Show Gist options
  • Select an option

  • Save rponte/d770d1104903d0a32cfc to your computer and use it in GitHub Desktop.

Select an option

Save rponte/d770d1104903d0a32cfc to your computer and use it in GitHub Desktop.
Copying all files from a directory to another using rsync (only difference)
# don't forget the slash (/) at end of dir
rsync -av original-uploads/ uploads/
# the best way to keep target-dir synchronized with source-dir (even deleted files are synchronized)
rsync -auvz --delete original-uploads/ uploads/
# synchronizing local-dir into remote-dir (in the end we'll have a dir on remote machine as this: ~/my-files/original-uploads)
# warning: pay attention to the lack of slash in original-dir
rsync -auvz --delete original-uploads rponte@triadworks.com.br:~/my-files
@rponte

rponte commented Sep 19, 2015

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment