You are currently browsing the archives for 12 January 2011.
Displaying 1 entry.

rsync and cp -r

  • Posted on January 12, 2011 at 16:34

Since I lately had to do a lot of data-migrating stuff, I made myself an alias for rsync and I use it as recursivecopy-command. Works great! Write this down… 🙂

Alias
# alias rcp='rsync --owner --group --perms --times --archive --recursive --progress'

Some advantages

  • No worries about accidentally overwriting important files
  • No struggle with long syntaxis anymore
  • Same syntaxformat as cp
    Example: # rcp -v /home/user1/* /home/user2/*
  • Progress indicator
  • Retaining file permissions and ownerships
  • Very forgiving with interruptions!
    You can hit CTRL-C without any risk. Just restart your rcp-action. And it will continue where it left of…

And sure you can add this alias to the bashrc, the .bash_profile, and so on….