More convenient running from the command-line

What if you wanted to run Affirmation from the command line on a regular basis? Your best option is to move the executable to one of the standard directories for executables. This will allow you to run from the command line using only the name of the executable:

$​ ​A​f​f​i​r​m​a​t​i​o​n​ ​"​t​h​e​ ​b​e​s​t​"​ ​4​

The standard directories for executables are determined by the PATH environment variable.

In Terminal, find your PATH environment variable:

$​ ​e​c​h​o​ ​$​P​A​T​H​
/​u​s​r​/​b​i​n​:​/​b​i​n​:​/​u​s​r​/​s​b​i​n​:​/​s​b​i​n​:​/​u​s​r​/​l​o​c​a​l​/​b​i​n​:​/​u​s​r​/​X​1​1​/​b​i​n​

The /usr/local/bin directory a good home for Affirmation; by convention, it is the directory for user-installed tools on Unix and Unix-based systems, like OS X.

Even though the /usr/local/bin directory is in your PATH environment variable, it may not exist on your Mac. If this is the case, then you will need to create the /usr/local/bin directory. Type the following command to make the directory if it does not already exist:

$​ ​m​k​d​i​r​ ​-​p​ ​/​u​s​r​/​l​o​c​a​l​/​b​i​n​

Next, type the following command to open the /usr/local/bin directory in Finder:

$​ ​o​p​e​n​ ​/​u​s​r​/​l​o​c​a​l​/​b​i​n​

In Finder, copy Affirmation into /usr/local/bin.

Now that Affirmation is in /usr/local/bin, you no longer have to provide the complete path to the executable in Terminal; you can use just its name:

$​ ​A​f​f​i​r​m​a​t​i​o​n​ ​"​g​o​o​d​ ​e​n​o​u​g​h​"​ ​3​

The system will scan the directories in the PATH environment variable, and find and run Affirmation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset