title: On macOS, how can I find the app's path which opens with “open” command?
body: <p>In macOS, one of the options to open an application via "open" command would be like so:</p>
  
  <pre><code>$ open -a "Google Chrome"
  $ open -a "GIMP"
  </code></pre>
  
  <p>But I realized that the command above <strong>works even if the apps weren't in <code>/Applications</code> nor <code>~/Applications</code> directory</strong>.</p>
  
  <p>So, "how can I get the path of this app" using a command line?</p>
  
  <p>I tried to use the <code>find</code> command and search the whole machine, but I thought that there would be an easier way to find it.</p>
  
  <p>The reason is that I need to access the bin file inside the ".app" directory like below:</p>
  
  <pre><code>$ /path/to/GIMP.app/Contents/MacOS/GIMP-bin --help-all
  </code></pre>
  
  <p>Since the command below doesn't seem to parse the arguments.</p>
  
  <pre><code>$ open -a "GIMP" --args --help-all
  </code></pre>
  
  <hr>
  
  <ul>
  <li>macOS HighSierra (OSX 10.13.5)</li>
  </ul>