Skip to content

Instantly share code, notes, and snippets.

@jen20
jen20 / HexDumpUtil.java
Created May 19, 2015 14:33
Dump byte array in hex dump format in Java
import java.io.UnsupportedEncodingException;
public final class HexDumpUtil {
public static String formatHexDump(byte[] array, int offset, int length) {
final int width = 16;
StringBuilder builder = new StringBuilder();
for (int rowOffset = offset; rowOffset < offset + length; rowOffset += width) {
builder.append(String.format("%06d: ", rowOffset));

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs