Most of bioinformatics is done with command-line software, so you should take some time to learn to use the shell effectively.
This is a command line prompt:
bush202>
This is another:
(~) 51%
This is another:
lstein@bush202 1:12PM>
What you get depends on how the system administrator has customized your login. You can customize yourself when you know how.
The prompt tells you the shell is ready to accept a command. When a long-running command is going, the prompt will not reappear until the system is ready to deal with your next request.
Type in a command and press the <Enter> key. If the command has output, it will appear on the screen. Example:
(~) 53% ls -F GNUstep/ cool_elegans.movies.txt man/ INBOX docs/ mtv/ INBOX~ etc/ nsmail/ Mail@ games/ pcod/ News/ get_this_book.txt projects/ axhome/ jcod/ public_html/ bin/ lib/ src/ build/ linux/ tmp/ ccod/ (~) 54%
The command here is ls -F, which produces a listing of files and directories in the current directory (more on which later). After its output, the command prompt appears agin.
Some commands, such as netscape, launch a graphical program. In this case, the command prompt won't reappear until the program finishes. This is annoying behavior, so a better way to run such programs is to run them in the background. The easiest way to do this is to add an ampersand (&) to the end of the command like this:
(~) 54% netscape& (~) 55%
Most shells offer command line entering. Up until the comment you press <Enter>, you can go back over the command line and edit it using the keyboard. Here are the most useful keystrokes:
There are also some useful shell commands you can issue:
tcsh offers automatic command completion and spelling correction. If you type part of a command and then the tab key, it will prompt you with all the possible completions of the command. For example:
(~) 51% fd<tab> (~) 51% fd fd2ps fdesign fdformat fdlist fdmount fdmountd fdrawcmd fdumount (~) 51%
If you hit tab after typing a command, but before pressing <Enter>, tcsh will prompt you with a list of file names. This is because many commands operate on files.
Type a few letters and then Alt-p to make tcsh search backwards for a command you previously issued that starts with those letters.
You can use wildcards when referring to files. "*" refers to zero or more characters. "?" refers to any single character. For example, to list all files with the extension ".txt", run ls with the pattern "*.txt":
(~) 56% ls -F *.txt final_exam_questions.txt genomics_problem.txt genebridge.txt mapping_run.txt
There are several more advanced types of wildcard patterns which you can read about in the tcsh manual page. For example, you can refer to files beginning with the characters "f" or "g" and ending with ".txt" this way:
(~) 57% ls -F [f-g]*.txt final_exam_questions.txt genebridge.txt genomics_problem.txt
When you've had enough fun with the shell, log out with logout or exit. No, not bye, nor quit, nor even logoff work. This will close the terminal window.
|
| Contents |
Next |