How to find package for installed file in Brew?

后端 未结 6 591
囚心锁ツ
囚心锁ツ 2020-12-23 13:37

How can I identify the package/formula for a given file, or a listing of all of a package\'s owned files, in Homebrew?

6条回答
  •  春和景丽
    2020-12-23 13:42

    To see all files in a package:

    brew ls 
    

    To find the package for a file, look at the file like this:

    ls -l /usr/local/bin/whatever
    

    If it was installed by Homebrew, it will be a symlink into /usr/local/Cellar/something, so that will tell you what package it's from.

提交回复
热议问题