Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I'd like to check the version of Firefox through Apple Remote Desktop of all managed computers. I have written this, but it only checks for Firefox in /Applications

/bin/cat /Applications/ | grep -A 1 CFBundleShortVersionString | grep string | sed 's/[/]//' | sed 's/<string>//g'

For standard users Firefox auto update breaks if it is in /Applications so I instead have it installed in ~/Applications

I'd like to check that copy (if it exists), but I can't specify the path in the command since it is unique to each computer. For example:



Presumably I want to use find and pipe the result to my command. This should work for 10.6 through 10.8

share|improve this question
locate |grep "$"

should give you the exact location(s)

share|improve this answer
locate on OS X is uninitialized by default. – Daniel Beck Jul 2 '13 at 20:13

One way to do this would be to us a shell script to get the list of user folders in /Users, and look through those in a loop. Something like:

for i in $(ls /Users/ | grep -v Shared | grep -v Deleted)
    grep -A 1 CFBundleShortVersionString /Users/${i}/Applications/ | grep -A 1 CFBundleShortVersionString | grep string | sed 's/[/]//' | sed 's/<string>//g'
share|improve this answer

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.