Ubuntu – the meaning of ./ before a given path


I've been told to run this:

./yiic message ./app/messages/config.php

But I don't understand the ./ meaning, can anyone clarify please.

Believe me, we can't google that. I've tried:

./ meaning
./ ubuntu

It was the same as nothing. 🙁

Best Answer

./ or just . is unix shorthand for the current directory.

You need to specify it when the current directory is not in your PATH. The PATH is the list of folders searched when you run a program. (You can determine it by writing echo $PATH.) If an executable file is not in your PATH, to run it you need to specify the folder it's in. You could do this by giving the full path to the file, but if the file is in the current directory, you can use ./ as shorthand.

Similarly, ../ or just .. is shorthand for the directory above the current one.

Related Question