File Management Conclusion
Sample cshrc File
Grep Regular Expression
Pattern Matching - Quiz
editing with vi
Modifying Previous Command - Exercise
Using the history feature
Use command history to display, repeat, and modify commands.
You will receive2 points for this exercise.
Submitting your exercise
This exercise is auto-scored. When you have finished, just click the
button to receive full credit.
In this exercise, you will set up the command history and enter random commands.
Then you will use the history feature to display, repeat, and modify your commands.
Log in to your course account.
Type the script command to begin saving your UNIX session to a file named ex200-3:
% script ex200-3
Use the set history command to begin remembering up to 25 commands.
Enter random commands so that you accumulate a list of commands. Harmless commands include ls, pwd, date, who, and clear.
Use the history command to display your command history.
Try a few history substitutions. Try the main forms, !pattern, !N, and !!, at least once.
Create a new directory, but misspell the command as makedir instead of mkdir.
Use quick substitution to correct makedir to mkdir.
Use cd with the !$ word substitution to change to the directory you just created.
Type exit to end the script command.
Log out when you are done.
Exercise - Hints
If you enter the logout command, but it responds
Not login shell
, it means you forgot to end the script command.
Type exit and then logout.