Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Related to this question:

Via 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?

share|improve this question
up vote 9 down vote accepted

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

mdls -name kMDItemWhereFroms filename

share|improve this answer

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

sqlite3 ~/Library/Preferences/* 'select LSQuarantineDataURLString from LSQuarantineEvent' | grep YOURFILENAME

Just exchange YOURFILENAME with the file you want to check.

share|improve this answer
why the down vote? A comment about it would be nice – Pfitz Dec 6 '12 at 13:49
I don't think your answer fully applies to the question. That's probably the reason you got the downvote. – patrix Dec 8 '12 at 20:21
@patrix the question is: can you get the same information from the command line. And you can get these informations with the above stated command. It may not be the best solution to the question but it is for sure an alternitve to lhf s answer. – Pfitz Dec 8 '12 at 23:15
Only if the information is still (or was at all) in the database. – patrix Dec 9 '12 at 9:21
@patrix and the file exists ..... the computer is turned on .. – Pfitz Dec 9 '12 at 9:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.