Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

This is showing some of my rust when it comes to work with *nix like systems - or I can just blame it on the fact that I'm new to Mac OSX.

Question is, if I have a program at location, say:


what steps can I take to make sure I can run pdftotext from anywhere. In other words, what configuration file do i have to modify (or anything else I can do) to make sure that, no matter what directory I'm in, a call to pdftotext will succeed?

share|improve this question

migrated from Nov 8 '11 at 4:07

This question came from our site for professional and enthusiast programmers.

Use the full path and it should always succeed. – Ryan O'Hara Nov 8 '11 at 4:05
yes, but i don't know what the full path with be on the other machine that this code will run on. so instead of hard-coding the full path, i'd like to emulate the production environment. – Ramy Nov 8 '11 at 4:08
Then put it in a configuration file and have the application load it. (My original comment was meant as a bit of a joke.) – Ryan O'Hara Nov 8 '11 at 4:09
Did you install homebrew? – slhck Nov 8 '11 at 8:49
up vote 1 down vote accepted

You need to modify one of your shell's variables called $PATH, by adding the directory containing the program.

If you do it in your shell's configuration file, it will still work in subsequent shell sessions.

So basically, you want to add this to your ~/.bash_profile. (assuming you're using terminal/bash)

export PATH=$PATH:/usr/local/bin
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .