Technology
Search
SiteMap
DBWebApplications
eWebProgrammer
Active Directory Administrationistration
Advanced Unix Concepts
Unix Shell Programming
Shell Scripting
Installing Windows 2000
Linux Network Administration
Unix System Administration
Network Security and Firewalls
Unix Concepts
File Management
Unix Customization
Grep Regular Expression
Modifying previous Command - Exercise
Using the history feature
Objective:
Use command history to display, repeat, and modify commands.
Exercise scoring
You will receive2 points for this exercise.
Submitting your exercise
This exercise is auto-scored. When you have finished, just click the
Submit
button to receive full credit.
Background/overview
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.
Instructions
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.