Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Mystery solved...

[nemo@Saturn.local /Applications/AppsUser/System]$ ls -l | grep ExpanDrive
-rw-r--r--@  1 nemo  admin         0 Nov 16  2010 ExpanDrive.app
[nemo@Saturn.local /Applications/AppsUser/System]$ file ExpanDrive.app 
ExpanDrive.app: empty

Works fine for other apps. Now what, do I delete this question seeing as how it's invalid?


I'm trying to get a little binary inside an application bundle to run from the commandline, like

$ ./ExpanDrive.app/Contents/Resources/expan

('expan' is the binary inside ExpanDrive's application bundle)

This doesn't work, ("Not a directory"), nor can I cd into it, or list its contents. Are there toggles for cd and ls that allow this, or other utilities?

To clarify, this is what happens:

[nemo@Saturn.local /Applications/AppsUser/System]$ cd ExpanDrive.app 
-bash: cd: ExpanDrive.app: Not a directory
[nemo@Saturn.local /Applications/AppsUser/System]$ ExpanDrive.app/Contents/Resources/expan
-bash: ExpanDrive.app/Contents/Resources/expan: Not a directory

Is it possible that this does not work because I'm logged in over SSH?

share|improve this question

closed as too localized by slhck Dec 18 '12 at 14:27

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
what is expan?? file or folder? –  Shantanu Banerjee Dec 18 '12 at 12:19
    
expan is the name of the binary I'm trying to run, inside ExpanDrive's application bundle. It's just an example though. –  MSpreij Dec 18 '12 at 12:36
    
use only ExpanDrive.app/Contents/Resources/expan –  Shantanu Banerjee Dec 18 '12 at 12:38
    
Hrm. Good one, I found it does work on Mountain Lion (with or without a leading "./"), but not on Leopard Snow. I'm SSH'd in if that makes a difference (I hope not!). –  MSpreij Dec 18 '12 at 12:41
1  
From the /Applications/AppsUser/System directory, will you ls -l | grep ExpanDrive and tell us the output? Also, file ExpanDrive.app. –  William Jackson Dec 18 '12 at 13:25

1 Answer 1

up vote 1 down vote accepted

You can usually just specify the full path:

/Applications/ExpanDrive.app/Contents/Resources/expan

This would also work:

cd /Applications/
ExpanDrive.app/Contents/Resources/expan

./ is only needed for running executables in the current folder.

cd /Applications/ExpanDrive.app/Contents/Resources/
./expan
share|improve this answer
    
Thanks, I didn't know that last tidbit. However this does not work for me :-/ updated question. –  MSpreij Dec 18 '12 at 13:20

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