Get Homebrew formula install path including version

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

I am looking for a way to determine the installed path of a Homebrew formula that includes the version number.

Currently I am aware of the following command,

brew --cellar pig

which will return,

/usr/local/Cellar/pig

However, the actual install path is,

/usr/local/Cellar/pig/0.15.0

which changes when newer/older versions are installed.

Is there any way to obtain this information using a brew command or the command line?

Answers

You could use brew list <package> and cut up to the version.

Eg:

$ brew list hbase | head -1 | sed  s/(^.*/hbase/[^/]*).*/1/  
/usr/local/Cellar/hbase/1.1.5

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/37381058/get-homebrew-formula-install-path-including-version

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils