bash is /bin/bash Try these few words with (Web host server)
Monday, April 30th, 2007bash is /bin/bash Try these few words with the type command to see other locations of commands: which, case, and mc. If a command resides in several locations, you can add the -a option to have all the known locations of the command printed. Tip Sometimes you run a command and receive an error message that the command was not found or that permission to run the command was denied. In the first case, check that you spelled the command correctly and that it is located in your PATH. In the second case, the command may be in the PATH, but may not be executable. The section on working with files describes how to add execute permissions to a command. Rerunning commands It s annoying, after typing a long or complex command line, to learn that you mistyped something. Fortunately, some shell features let you recall previous command lines, edit those lines, or complete a partially typed command line. The shell history is a list of the commands that you have entered before. Using the history command, you can view your previous commands. Then, using various shell features, you can recall individual command lines from that list and change them however you please. The rest of this section describes how to do command-line editing, how to complete parts of command lines, and how to recall and work with the history list. Command-line editing If you type something wrong on a command line, the bash shell ensures that you don t have to delete the entire line and start over. Likewise, you can recall a previous command line and change the elements to make a new command. By default, the bash shell uses command-line editing that is based on the emacs text editor. So, if you are familiar with emacs, you probably already know most of the keystrokes described here. Tip If you prefer the vi command for editing shell command lines, you can easily make that happen. Add the line: set -o vi to the .bashrc file in your home directory. The next time you open a shell, you can use vi commands (as described in the tutorial later in this chapter) to edit your command lines. To do the editing, you can use a combination of control keys, meta keys, and arrow keys. For example, Ctrl+f means to hold the control key and type f. Alt+f means to hold the Alt key and type f. (Instead of the Alt key, your keyboard may use a Meta key or the Esc key instead. On a Windows keyboard, use the Windows key.) To try out a bit of command-line editing, type the following command: $ ls /usr/bin | sort -f | more This command lists the contents of the /usr/bin directory, sorts the contents in alphabetical order (regardless of upper- and lowercase), and pipes the output to more (so you can page through the results). Now, suppose you want to change /usr/bin to /bin. These are steps you can use to change the command: 1. Press Ctrl+a. This moves the cursor to the beginning of the command line. 2.
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision j2ee hosting services