Quick Question

I know in DOS, when you want to pull up your last/previous command, you hit the up/down arrows. How do you do that with UNIX?

That is a function of the shell and the command line editor you are working in/with. I work in KSH so I set my EDITOR environmental variable to <B>vi</B> and have the entire range of vi search and replace on the command line. This is the same as all the vi commands in a file. For example, to move forward a line: <ESC>j ; backwards: <ESC> k. To search for a command: <ESC>/string . This is very powerful and fast (much more powerful than DOS, BTW).

Other use EMACS as the command line editor.

Also, differnet shells have builtins that do not require using a command line editor. For me, I could not imagine not using vi or emacs on the command line. The power is amazing.

Oh wow, something that I can answer.

at a command prompt, type ksh
this will get you to the other shell if you are currently in the bourne shell.

then type in set -o vi

To test things out, type in a command and execute.
To repeat this command, press the ESC key. Then use the
j and k keys to scroll through the old commands. After you execute the old command, you will have to press the ESC key again to get to the old commands.

You can, also, edit the old command as though you were in vi editor..

Another shell, bash (often installed in /usr/local/bin/bash), allows you to scroll through the command history with the up/down arrow keys. Bash is typically installed in Linux or Solaris 8 machines but can be added to most UNIX flavors. To see if bash is on you system, execute;
which bash


ls /usr/local/bin/bash