[thelist] OT Unix Commands

martin.p.burns at uk.pwcglobal.com martin.p.burns at uk.pwcglobal.com
Thu Feb 8 06:19:31 CST 2001


Memo from Martin P Burns of PricewaterhouseCoopers

-------------------- Start of message text --------------------

The other thing is that even if you typed it at the command prompt
(ie you're doing it in your own car), it still wouldn't tell you that it had
arrived, as it assumes that you'll understand that if you give it a command,
it will perform it (and maybe complain if it can't).

So if you did cd directory/directory2, you'd then *be* in directory2, and
simply by getting a command prompt back, you'd know your command
had been successful.

To see which directory you're in, type
pwd
which is short for 'print working directory', or "where the hell am I?"

Similarly, if you did
rm -rf *
****WARNING, do *not* try this at home, ***especially*** if logged in as
root/superuser****
you wouldn't be told that you'd just deleted your entire file system.
It assumes "Hey, you gave me the command. I assume you know what you're
doing", and just goes and deletes it all. Without an undo, I might add.

(slight expansion - DOS knows that del *.* means "trash everything" because it
parses the entire command at once. Whereas Unix first expands the * into a list
of
files, then passes them to the rm command, so it neither knows nor cares that
it's
*all* your stuff)

Cheers
Martin





Please respond to thelist at lists.evolt.org
To:   thelist at lists.evolt.org
cc:


Subject:  Re: [thelist] OT Unix Commands




The big difference here between a DOS batch file and a Unix script is
that the DOS .bat will run as the same process that the user who's
running it, whereas unix doesn't. I guess the best way to put it is this:

Say we have two cars, one is the Unix car and one is the DOS car. We
tell them both to go two blocks(cd directory/directory2). The DOS car
goes two blocks with you inside it while the Unix car drives itself
there and won't take you unless you ask it to.




--------------------- End of message text --------------------

The principal place of business of PricewaterhouseCoopers and its associate
partnerships is 1 Embankment Place, London WC2N 6NN where lists of the
partners' names are available for inspection. All partners in the associate
partnerships are authorised to conduct business as agents of, and all
contracts for services to clients are with, PricewaterhouseCoopers. The UK
firm of PricewaterhouseCoopers is authorised by the Institute of Chartered
Accountants in England and Wales to carry on investment business.
PricewaterhouseCoopers is a member of the world-wide
PricewaterhouseCoopers organisation.
----------------------------------------------------------------
The information transmitted is intended only for the person or entity to which
it is addressed and may contain confidential and/or privileged material.  Any
review, retransmission, dissemination or other use of, or taking of any action
in reliance upon, this information by persons or entities other than the
intended recipient is prohibited.   If you received this in error, please
contact the sender and delete the material from any computer.






More information about the thelist mailing list