Add a Recent Items Menu to the Dock

You can add a Recent Items menu to the Mac OS X Dock by using a defaults write command. The default is set to “Recent Applications” but once the Dock item exists you can adjust it to feature other recent items too.
Launch the terminal and enter the following:
defaults write com.apple.dock persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }'
That needs to all be on a single line, so if you copy and paste it make sure the command is one string.
You will then need to kill the Dock:
killall Dock
Now right-click on the newly appeared Recent Applications Dock item and you can change it to be Recent Applications, Recent Documents, Recent Servers, Favorite Volumes, or Favorite Items.

If you want to remove the Recent Items menu, just drag it out of your Dock.
Thanks to Sean for the submission

That is sooooo Cool thanks
And what would one do to remove it? Just drag it out of the dock?
Good question, but yes, it will disappear into a puff of smoke like anything else dragged from the Dock
[...] OSXDaily, Images via [...]
That’s nice but it doesn’t work.
Here is the output:
-bash: syntax error near unexpected token `}’
I just copied the code and it’s only one line.
What do I wrong?
[...] Tipset kommer från osxdaily [...]
this was awesome. The only thing I wish I could do was have both recent apps and recent documents in the same folder. otherwise it would be sweet, but I just did the terminal thing twice so I have one of each. Thank you.
[...] "recents-tile"; }'Si todo ha ido bien, no nos dará ningún error. Si nos lo da, podéis acceder a OSXDaily, los que han publicado este truco, para copiar y pegar de su cuadro de texto, ya que puede que en [...]
[...] astuce a été publiée originellement sur OSXDaily. Articles en relation :CaptainDownload débarque dans la vente de contenusMises à jour Mac [...]
This seems to work for me, in that I get the dock icon, but nothing gets added to it, seemingly. How often does it update? Do I need to restart?
It worked great, but after I shut my mac off and started it up this morning, it was gone. I did it again, and it showed up twice in my dock. so I guess it was there, but was not showing. Will see if it is there the next time I reboot
[...] المصدر. [...]
CONFIRMED!
WORKS ALSO IN LEOPARD!!!
[...] : osXdaily [...]
how to display as dictionary and not stack?
thx
Excellent. The Apple Menu > Recent Items list is useless because it isn’t in reverse chronological order. This is in the proper order and is one less mouse click.
Thank you so much i have been googling for this all day and havent found out how to get it but now i have recent applications so thank you so much