Related to this question: https://superuser.com/q/514528/90435

Via http://osxdaily.com/2010/10/12/find-out-where-a-file-was-downloaded-from/ I find out that you can use 'get info' though Finder to find out where a file was downloaded from.

For example -
enter image description here

Now - my question is - can I get the same information from the command line?

2 Answers 2


mdls lists the metadata attributes of a given file. Try this:

mdls -name kMDItemWhereFroms filename

According to this article about command line tricks you can do the following:

sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'select LSQuarantineDataURLString from LSQuarantineEvent' | grep YOURFILENAME

Just exchange YOURFILENAME with the file you want to check.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .