Context: I'm using an OSX shell script to update my settings system-wide after a fresh OS install. One snag I've ran into is restoring Launchpad.
I have my launchpad DB backed up via GoogleDrive at: $HOME/GoogleDrive/System/launchpad.db ... It makes sense to use a cat command to replace the Apple database, found with: find "${HOME}/Library/Application Support/Dock" -name "*-*.db" -maxdepth 1 ... Result: /Users/joshuaberk/Library/Application Support/Dock/441BC58D-D647-45B6-A963-A9DAB110BB47.db
There might be a better way to do this with ln -s or cp -- ultimately, I'd like it to stay in sync if I make any changes without manually copying, and without having to know the name of the Apple Launchpad DB file ahead of time. It should be a simple for loop like this, I'd think:
for DB in ~/Library/Application Support/Dock/*-*.db; do
cat $HOME/GoogleDrive/System/launchpad.db > ${DB}
done