Run MD5 check sum against all files in a directory

Posted on Leave a commentPosted in development

Couple snippets that allow us to run checksum and get unique md5 checksums. This is two step process. First, we obtain our md5 checksum for all files find -type f -exec md5sum "{}" + > /opt/checklist.chkfind -type f -exec md5sum "{}" + > /opt/checklist.chk This produces file with following contents 71cc452a8ac5a27c32a83e6a0909e7ae ./PID_190_7344_0_47710322.tif6712032974632727465.tiff 71cc452a8ac5a27c32a83e6a0909e7ae ./PID_190_7344_0_47710322.tif174464329785828524.tiff 71cc452a8ac5a27c32a83e6a0909e7ae […]

Tokenizing/splitting string in c++

Posted on Leave a commentPosted in cpp, Uncategorized

This method uses strtok to tokeninze our string given a specific delimeter, results of that are put into supplied vector. There are few other ways we can do this but this one is straight forward. #include <iostream> #include <string> #include <string.h>   #include <memory> #include <stdlib.h> #include <stdio.h> #include <list> #include <vector>   using namespace […]