Thread: Copy & md5 Shell Script

Results 1 to 10 of 91

Threaded View

  1. #1 Copy & md5 Shell Script 
    I have been playing around with a little shell script to make copies of footage and do md5 checksums on them. Mainly because things like R3D Data Manager only copy Red media and things like Shotput Pro don't do md5 checksums.

    Basically the script copies any folder to one to four destinations. Then makes md5 checksum of the source and each destination and compares them.

    Run it from the command line and then simply drag and drop folders from Finder to tell the script where things are. Pretty simple.

    I give no warranty and I wouldn't use this on important footage unless you have played with it and know what it is doing.

    I wrote this on OSX so some commands it uses might not exist on Linux or other systems. So test.

    Just thought I would share and let people play.


    Dusty


    edit -- I made a minor change to the script. I was trying to speed it up and compare the checksums in parallel and that was too fast for small files.
    edit -- changed the script so md5 deals with sub directories correctly (02/02/11)
    edit -- changed script so errors print to the screen instead of to /dev/null (02/02/11)
    edit -- cleaned up the code a little (02/10/2011)
    edit -- fixed a problem where the copy didn't work on files with "." in the initial directory name (02/17/11)
    edit -- made the md5 part ignore folders so it doesn't give errors on folders. md5 now only works on files and not directories or any special files (02/17/11)
    edit -- the script has problems with doing md5 on things like OSX applications which are actually some kind of hidden folder. The copy works, the md5 has issues. (02/17/11)

    edit -- added a new version (CopyScript_percent.sh) of the script for testing that has a config file, tells percent complete, and keeps timestamp of the source files. (03/10/11)
    edit -- Cleaned up things a little. Improved performance a little by having source checksum happen during second copy. Also made errors write to a log file. Will add more for this log file in the future. (03/11/11)
    edit -- added more info to the log file. /var/tmp/copyscript.log (04/19/11)
    edit -- modified the script so you can run multiple copies at once without conflict. So you can copy multiple different drives at the same time (04/19/11)
    edit -- fixed the source checksum 100% complete message. (04/22/11)
    edit -- changed the order of the questions at the beginning so the source drive is last.

    edit -- added link to GUI front version of the shell script. (01/18/12)
    http://www.sandust.net/SandustTools/SandustTools.zip

    edit -- link to the new GUI version of the script Chris created. (01/27/12)
    The latest version can be downloaded here: https://bitbucket.org/chriswayg/copy_verified/downloads
    If you find bugs please report them in the bug tracker here: https://bitbucket.org/chriswayg/copy...ied/issues/new
    Attached Files
    Reply With Quote  
     

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts