No undo.
You'd need a (backup) dock.plist from
before the move to compare to the current:
defaults read com.apple.dock |sed '/^ *"_CFURLString" = /!d;s///'
If this happens a lot, maybe the first thing to do when working on a machine is to
backup the dock.plist (and whatever else necessary). Then when you're finished, just copy 'em back.
--
Although, there seems to be some sort of (SQL?) database cache file at ~/Library/Preferences/com.apple.dock.db -- but i don't know how to "decode" it. Yikes, i just ran
strings on it...
strings ~/Library/Preferences/com.apple.dock.db
...and i couldn't believe the junk Apple has squirreled away in there!!!
(try it and see).