Linux.com

another noobee thing

Link to this post 02 Jan 12

The .tar files are automatically stuck in Downloads. does it matter where you are in the directory when you unpackage and ./configure them? do they load where they are suppose to go?

Link to this post 02 Jan 12

same question if you are doing a yum install?

Link to this post 02 Jan 12

???

./

This orders the shell to look into your current directory (that is "."). In fact, it adds the directory to the PATH variable. Thefore, you need to be where "configure" script is.

And no, they don't load where they're suposed to. I will assume you are doing a classic software installation with "configure && make && make install".

configure will ready the software to compile, make will compile it and "make install" will place the needed files in your system. NOTICE that this is standard isntallation, if your distro places things in a special way.... it probably won't work ;)

With a "yum install" yes, everything will be in place and your system will be fine :)

Therefore... use yum!!!

Regards

Link to this post 02 Jan 12



This orders the shell to look into your current directory (that is ".")

is it?. thanks for the info.
But, in that way, a executable in that should work, without giving '.' , right?
means, why we need to mention the current dir location, while we are already in the dir, where the binary file is present?

I think all binay executables need "./" to run, unless they are in /bin or /sbin.

Just my opinion. correct me if I am wrong Marc
BTW, that "&&" logic you used to explain is, Good.

Link to this post 02 Jan 12

And , is the quote option working ?

Link to this post 02 Jan 12

Quoting still doesn't work (as neither does most of the forum functionallity).

The shells that follow the POSIX standard look in your PATH variable for binary files to execute. In a regular *nix configuration the current working directory (shown by $PWD as in Print Working Directory) is not in the PATH variable and that's why binaries are not found when you try to execute them without the "./"

When you type the "./" you are doing something like:

 PATH=./:$PATH

Effectevely adding your current direcory to the PATH. From then on you can run binaries in your current directory :)

If you really want to run binaries without the "./" you could add the current directory to your PATH with something like

 export PATH=$PWD:$PATH 

NOTICE: security risk!

To go even deeper into this: the "." is just a file with the inode number of your current directory, i.e. the same as $PWD

Try this:

diff <(stat . ) <(stat $PWD) 

And you'll see that the only difference is the name!

Regards

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board