Tuesday, October 20, 2009

Unix commands

Having covered this much ground let us now get into the thick of the things. Most of us would be entering the Unix arena after traversing that of DOS. So just so as to feel at home, we will first have a look at some commands in Unix that are parallel to those available in DOS. The following things need to be remembered which apply to all Unix commands:
  • All Unix commands must always be entered in small case letters.
  • Between the command name and the options that may be available with the command there must always be a space or a tab. For example, ls -l. Here ls is the command whereas -l is the option and the two have been separated by a space. The option is usually preceded by a minus (-) sign. The options available with a command are often known as switches.
  • Two or more options available with a command can usually be combined. For example, the command ls -l -a is same as ls -la.
  • If you make a typing mistake, press Backspace to erase characters. Don't try to back using arrow keys and then attempt deleting using the Del key.
  • To cancel the entire command before you press Enter, press the Del key.
  • Don't turn off the computer if you have made a mistake and all is not going well. DOS users are used to just turning off the computer if a command behaves strangely, possibly by falling into an infinite loop or some other such thing. Unix doesn't respond well to such an approach. Instead we need to suggest politely to Unix to stop execution of the command which is creating a problem. One way to do so is by hitting the Del key. If still the command is not abandoned try Ctrd d and you would be returned to the login prompt. And if it is really a bad day for you even Ctrl d may not be able to do the job. At such times you got to contact the system administrator who would then kill your process from memory.

No comments:

Post a Comment