Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I move files from one place to other with validation/md5 done to origin and destination? Is there some tool or sequence of commands you can script to do this?

share|improve this question
up vote 3 down vote accepted


tutorials :

for example, i use

rsync -rptDuv --exclude ~/.ssh $SOURCEDIR -e ssh -t $USER@$BACKUPSERVER:/$TARGETDIR

for backing up whole $SOURCEDIR trough ssh to some server. But there is much more options, you can read

man rsync

for them.

about moving, you can use option --remove-source-files or just delete files after copy

share|improve this answer
can you expand this? - the OP wants to move files not synchronise files. – fossfreedom Jun 29 '11 at 22:11
sure, i will... – Denwerko Jun 29 '11 at 22:13
Just thought I'd add that files aren't really "moved". If you move a file within a filesystem, then only the link to the file is changed, while the file itself remains unchanged. In that case, there is no need to check the file for changes. If you "move" it to another filesystem, then the file is first copied and then deleted, so a synchronization is a good solution. – Jo-Erlend Schinstad Jun 29 '11 at 22:43
Yes, I'm moving files from hard disk, to a USB Disk, and want to make sure they are correctly moved. Thank you! – Luis Lobo Borobia Jul 1 '11 at 13:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.