Re: whoami explanation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



PJ wrote:

Gee, thanks. So, when was I supposed to have used this alias? Hell, I
can live with my ignorance. What's a POSIX system and why is it a POSIX
- a language, I think I heard....

cd ~

brings you to your home directory.

cd ~/stuff

brings you to the stuff sub-directory of your home directory.

[mpeters@athens ~]$ echo ~
/home/mpeters
[mpeters@athens ~]$

Notice the tilde in the prompt - tells me I am in my home directory when I issued the command.

POSIX is not a programming language, it is a specification that allows for some compatability between different operating systems.

http://en.wikipedia.org/wiki/POSIX

-=-

With respect to value of issuing shell commands from within php - I'm sure there are some legitimate uses. I use to do it all the time but now I really try not to because it makes the php less portable.

IE not only is it now tied to the php modules that I use, but features of the operating system it is running on top of.

In some cases it may really be necessary - IE when calling the TeX system to generate a document, or when writing a search engine capable of indexing not html/xml formats (IE pdf, MS Word, etc.) you may really need to use the shell of the underlying operating system, but I think one really should try to find a "pure php" way whenever possible.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux