: help in running Terminal commands


csonni
Feb 16th, 2003, 05:39 PM
I just tried running a Terminal command (to update prebinding). After hitting the return key (that is what you're supposed to do after typing a command?) I was presented with a small black block for my password, but I couldn't type anything. Where can I find help on future commands such as these? Are you supposed to "space" in between words?

dthompson101
Feb 16th, 2003, 07:26 PM
a quick tip on CLI. If you type in:

sudo update_prebinding -root /
You will be prompted for your password. Type it in and hit return when done and the command will begin. You never see your password being typed out, just the one black cursor.

To go to root from the terminal for 5 minutes, type in: sudo -s and then type in your password.

You should then have a terminal that looks something like this:

[digibook:~] david% sudo -s
Password:
[digibook:~] root#


Hope that helps smile.gif

gordguide
Feb 17th, 2003, 11:29 AM
UNIX is not a hand-holding OS, at least from the terminal.

It sounds like you gave a command, and then expected some feedback right away.

UNIX is very straightforward; it assumes you know what you are doing and when you tell it to do something, it just does it. It may or may not give you feedback like you expect it to.

If you enter a command at the shell prompt, then whatever you told it to do is done when you get another shell prompt. If it doesn't look exactly like your shell prompt, then it isn't. That's all the feedback you get, really. Sometimes stuff scrolls on the screen, but not always.

If you aren't sure whether you should be using a space between commands, stop and go back to your documentation (or whatever you used as a reference).

If there is supposed to be a space, it should be there. If it is supposed to have a single space, don't use a double space. Enter commands exactly as they are supposed to be. Like I said, it assumes you know what you are doing, and if you get it wrong and it just so happens that it thinks you want to do something else, it will just go about doing that something else.

UNIX commands are case sensitive; don't substitute a lower-case character for a capital, for example.

UNIX expects a mono-spaced font, like courier. Always use a mono-spaced font to avoid confusion as to whether you have one space or two. If it helps, you can adjust the font size larger to make it easier for you to know what you've entered.

The shell prompt looks like this (yours will be different depending on the computer name, etc):

[Johnny-OSX:~] johnny%

Note: after the % character, there will be a single space then the cursor; I can't display the cursor properly here.

As has been mentioned, UNIX will hide the password entry from prying eyes, including your own.

Remember, whatever you tell it to do (not to be confused with what you thought you told it to do) will be done. Be careful.

csonni
Feb 17th, 2003, 06:04 PM
Thanks for the good advice. I just as soon stay away from the Terminal.

Chealion
Feb 17th, 2003, 07:21 PM
csonni, the terminal is a great application as long as you spend some time to learn how to use it. It allows you to do a great deal more then you would think, but the problem is it is rather archaic in nature. Its like ResEdit of the OS 9 days in a way, it has great power and should be used wisely. Also, it runs faster and I like using it as my FTP client.

PosterBoy
Feb 18th, 2003, 10:49 PM
The easiest way to learn about the terminal is hand on, playing with it (I think anyway) and with a book or webpages to help you out. Because it can do so much without you realising it though, the best way to treat the terminal is the same way that SpiderMan treats his super powers.

"With Great Power Comes Great Responsibility"

You have to treat it whish way because a simple mistyped command might erase your user folder and all your files, or worse yet every file on your hard drive. Fun eh?

--PB

Chealion
Feb 18th, 2003, 10:59 PM
If you are interested in a quick demonstration of how deadly the terminal can be, simply backup EVERYTHING, then in the terminal type "sudo rm -rf /" and hit return and kiss your hard drive goodbye... So make sure you know what you are doing... and never use the rm command unless you know what you are permantly deleting!