/Main_Page

::You must have ninja focus to complete your mission::NinjaFocus::

Sum-resources

Views:


This is a little something to get a list of md5 sums for your files

#!/bin/bash

# $@ [local|/path/to/resources] [pattern] 

RESOURCE_PATH=/var/www/vhosts/example.com/important-files

# For Mac
# MD5="md5 -r"

# For Linux
# MD5=md5sum

MD5="md5 -r"

PATTERN="'/^\.\/$2.*/p'"

if [$1 = 'site']
then
    PATH=$RESOURCE_PATH
else
    PATH=$1
fi


cd $PATH
find . -type f | sed -ne "$PATTERN" | sed -e '/\/\./d' -e 's/ /\\ /' | sort | xargs "$MD5" | sed -e 's/  / /'

Main Menu

Personal tools

Toolbox