A few small scripts without any parameter checking are below.
The are based on these links:
find-in-datastores.sh
#!/bin/sh
# Notes:
# the "find" parameter "-type l" only links, as they are the datastore aliases
# the "sed" appends a slash to all datastore paths
datastores_slashes=`find /vmfs/volumes/* -prune -type l | sed 's/$/\//' | xargs echo`
# find inside the datatastores with the arguments appended:
find $datastores_slashes $@
md5sum-sorted-and-regular.sh
:
#!/bin/sh
md5sums=`md5sum $@`
echo Regular:
echo "$md5sums"
echo Sorted:
echo "$md5sums" | sort
md5sum-of-find-in-datastores-by-name-sorted-and-regular.sh
:
#!/bin/sh
md5sum-sorted-and-regular.sh `find-in-datastores.sh -name $@`
Example usage:
# md5sum-of-find-in-datastores-by-name-sorted-and-regular.sh EN-10ENT-x64.vmx
Regular:
7f34fbceed59957a4b7feb13ef9327a1 /vmfs/volumes/Samsung512NVME/PSO.Template/VM/EN-10ENT-x64/EN-10ENT-x64.vmx
7f34fbceed59957a4b7feb13ef9327a1 /vmfs/volumes/Samsung850-2TB-S2KMNCAGB04321L/PSO.Inactive/VM/EN-10ENT-x64/EN-10ENT-x64.vmx
7f34fbceed59957a4b7feb13ef9327a1 /vmfs/volumes/Samsung850-2TB-S3D4NX0HA01043L/PSO.Inactive/VM/EN-10ENT-x64/EN-10ENT-x64.vmx
Sorted:
7f34fbceed59957a4b7feb13ef9327a1 /vmfs/volumes/Samsung512NVME/PSO.Template/VM/EN-10ENT-x64/EN-10ENT-x64.vmx
7f34fbceed59957a4b7feb13ef9327a1 /vmfs/volumes/Samsung850-2TB-S2KMNCAGB04321L/PSO.Inactive/VM/EN-10ENT-x64/EN-10ENT-x64.vmx
7f34fbceed59957a4b7feb13ef9327a1 /vmfs/volumes/Samsung850-2TB-S3D4NX0HA01043L/PSO.Inactive/VM/EN-10ENT-x64/EN-10ENT-x64.vmx
–jeroen