Re: whoami explanation
| From: | Michael A. Peters | Date: | Wed, 04 Mar 2009 00:33:27 +0000 |
| Subject: | Re: whoami explanation | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-289209@lists.php.net to get a copy of this message | ||
PJ wrote:
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.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....