How can I run a command that is in a different directory so that the command thinks I've ran it in the current directory?
If a command is using basename() or argv[0] (or whatever it's called) to get where it was called from, and it requires files in its directory, it may look in the directory that you called the application from; i.e. the wrong one.
Of course, you can cd to the directory first and invoke it there, but is there a way to invoke the application so that it thinks you've ran it from its directory (without cding first)?
If it is possible, I will use this in crontab, as the thought of using cd in there scares me.