Govinda <govinda.webdnat...@gmail.com> squawked out on Sunday 14-Aug-2011@14:52:35 > WHY does it not work to > just be in the right directory and type the name of a command
Unix will only execute files that are either in the predefined path or are specified by a full path name. This is a security measure. For example, if you have the command ‘ls’ to list a directory and someone writes an executable named ‘ls’ than instead deletes the current directory the could be bad. So, you define a list of folders (called the PATH) that contain all the programs that you generally want to run. For example, my PATH differs from the default in that I added $HOME/bin to the end of it so that the scripts that I write are run-able without my typing ~/bin/myscript, I can just type myscript instead. Since I added it at the END, nothing in my ~/bin/ will override a ‘real’ command in on of the default directories. I would still have to type ~/bin/myscript (or ./myscript if I was already in ~/bin/) to execute my own ls command. If you are interested in learning about the command line there is a very good series named "in a Nutshell", and of these, Unix in a nutshell is a great book. There is an OS X specific version, but it is for Tiger. <http://oreilly.com/store/series/nutshells.html> I still have my 1st edition Unix in a Nutshell and it is one of the few print books I still reference. I really should buy the Ebook 4th Edition, I just haven’t gotten around to it yet. -- Bowling scores are way up, minigolf scores are way down, and we have more excellent waterslides than any other planet we communicate with -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at <http://groups.google.com/group/bbedit?hl=en> If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>