For example, to run the last command that started with a "d", type "!d<ENTER>." Specify as much of the string to make it unique. If you have several commands in your recent history that begin with "d", you can add additional characters like "!du" or "!df".