2020-07-04 Ofxtools on Debian 10 - Struggling to get OFX tools to run on Debian 10, follow the link to see what I did.
2018-02-09 Using hashdeep and scripts to Ensure all files get moved
So here is the situation. I have tons of old computers and hard drives that were important to me at one time. Any of them could contain some cache of old important documents family photos of home movies that never got moved over. I want an automated way of auditing all images videos and documents on the hard drive to see if they exist on my backup drive already. If they do not, I want a list of those files so I can decide to either abandon them, or move them some place safe.
hashdeep is a tool that will recursively create a list of hash files for a directory. It can also compare all of the files it finds to a known list of existing hashes. It has a negative match feature that spits out the names of only those files without matches. Several months ago, I worked out how to do all this, but I am now rusty on it and I'm going to have to figure it out again.
It appears the idea I had was first to make a list of hashes of every file in a directory on my nas drive:
%%%% HASHDEEP-1.0
%%%% size,md5,filename
## Invoked from: /buffalo
## # hashdeep -c md5 -r wortley_family
Then I also created a list of hashes
First step is creating a list of files that we might be valuable. I've spent the morning learning regular expressions so I tell the find command explicitly what I want:
find ./photos1 -size +30k -regextype awk -iregex '.*(jpg|mp.|mpeg|jpeg|avi|doc|pdf|doc|xls|xlsx|divx|qt|mov)$' > ./photos1/myfiles.list
This will help me find any photo, video, or word or excel document I may have created and build a file list.
This invokes hashdeep to produce a file with computed md5 hashes for every line in the file myfiles.list
hashdeep -v -c md5 -r -f photos1/myfiles.list
The below version of this puts the md5's into a file.
hashdeep -v -c md5 -r -f photos1/myfiles.list > photos1/mylist.md5
Now we have a list of known md5sums in a file format hashdeep likes in myfiles.md5, a list of files that are interesting myfiles.list, and we want to see if there are any files in myfiles.list that do not have a corresponding md5 signature in the myfiles.md5 list. Hashdeep does this with negative matching. The below command will print a list of files with relative pathnames that do not have a matching signature. I have checked that changing the name of the file in myfiles.md5 does not trigger an output line. Modiifying the md5sum in the file, does trigger an output line. With this even photos that have been renamed do not trigger matches, only missing photos. That can be very handy.
hashdeep -f photos1/myfiles.list -x -k photos1/myfiles.md5
2018-01-01 MPD on Raspberry Pi with Behringer UCA202
Over the holiday I have finally gotten around to rewiring the barn audio system the way I hoped. The changes have been:
Move the speakers to the storage end of the building so that I had a more consistent stereo sound stage in the rest of the building in the places I commonly stand.
MPD (music player daemon) running on the "barn brain" raspberry pi. This wired pi accesses music from the NAS so all my tunes are on tap. No more MP3 player hanging precariously above the sink from the headphone port and a USB wall charger.
The audio amp is connected to the lights so it uses no power when I leave the building.
App controllable on my droid phone using M.A.L.P. (see Google Play Store).
Controllable from the milling machine using QMPDClient.
Controllable from bench PC via QMPDClient.
Controllable from anywhere on the planet via ssh :)
What I had to change from the out-of-the-box configuration
music_directory
playlist_directory
# bind address wouldn't allow remote connections from my phone or qmpdclient without adding this:
bind_to_address "any"
zeroconf_name "Matt Music Player"
# The Behringer UCA202 increased the sound card count on the pi and I had a little trouble finding the right
# mixer. This allows use of the PWM mixer (which seems fine for good dynamic range).
# An example of an ALSA output:
#
audio_output {
type "alsa"
name "My ALSA Device"
device "hw:1,0" # optional
format "44100:16:2" # optional
mixer_device "hw:1" # optional
#mixer_control "PWM" # optional
#mixer_index "0" # optional
}
# I am just casually listening, so playing with the volume control all the time is annoying...
replaygain "track"
volume_normalization "yes"
Hiccups:
I had one port that powered up the USB sound card and the other one didn't? Not sure what is up with that...
The onboard rasberry pi sound card in the orginal version B I am using SOUNDS TERRIBLE. Because I want to use MPD to control volume, I crank up the amplifier gain all the way to max. All kinds of digital beeps and bloops from CPU and other activity on the pi get to be heard with the high gain. The Behringer sound card is perfectly silent in comparison. The treble notes also seem SO much clearer. Before, anything below 80% of full volume seemed inaudible instead of quiet, so it only sounded like music at >80% of full volume. With the Behringer card, I can turn it down as much as like and it still sounds good.