sfxfpw
Last Updated: February 25, 2016
·
522
· raindog

show complete download history on Mac

Damn!! You have just deleted completely your download history from the browser, and you want absolutely to find the url of that gorgeous MIL^W mountain photo you downloaded yesterday.

Don't worry. Mac stores this information forever (grr...) in a sqlite file.
You can view the content of the db, and extract the information you want, typing this command:

sqlite3 -noheader -line -separator ~/Library/Preferences/com.apple.LaunchServices.QuarantineEvents* 'select LSQuarantineDataURLString from LSQuarantineEvent WHERE LSQuarantineAgentName IS NOT "PubSubAgent"' | awk 'FS="=" {print $2}' | sed '/^ *$/d'  | sort | uniq