2

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?

1 Answer 1

3

rsync

tutorials : http://everythinglinux.org/rsync/

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

4
  • can you expand this? - the OP wants to move files not synchronise files.
    – fossfreedom
    Jun 29, 2011 at 22:11
  • sure, i will...
    – Denwerko
    Jun 29, 2011 at 22:13
  • 1
    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. Jun 29, 2011 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! Jul 1, 2011 at 13:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .