DispersedNet
SiteMap
Unix Concepts
Shell Programming
Shell Scripting
Unix Questions
Unix Concepts
«Prev
Next»
Unix Concepts
File Management
List Files Command
Copy Directories Command
Removing Directories Quickly
Unix About Links
Creating File Link
Find Command Search
File Management Conclusion
Unix Customization
Creating Aliases Unix
list current Aliases
Displaying Previous Commands
Repeating Previous Commands
Modifying Previous Command
Changing System Prompt
Storing shell Settings
Customize-environment
Grep Regular Expression
Define Regex
Using Quotes with Regex
Matching Pattern Occurrences
Matching Pattern Position
Turnoff Character Meaning
Regex Conclusion
Pattern Matching - Quiz
editing with vi
vi Review
Text in vi
Creating Text
Creating Command Shortcuts
Configure Editing Environment
Storing Custom Settings
Esditing Multiple Files
Pasting Text Files
vi Editing Conclusion
Managing Disk Space
Checking Disk Usage
Compressing Uncompressing Files
Viewing Compressed Files
File Archives
Create Archive
Listing Archives
Extracting Archive Files
Managing Disk Space Conclusion
Storing your C Shell Settings - Exercise
Course project: Creating a .cshrc file.
Objective:
Create a .cshrc file to store some custom settings.
Exercise Scoring
You will receive 5 points for this exercise.
Background and Overview
As you work on the eCyberCom Web site, you are likely to perform many file management tasks: copying, moving, deleting, and listing files. To make your job easier, you have decided to customize some of the commonly used commands by creating aliases to them. In addition, you want to save some time at the command line by repeating or modifying previous commands. To do that, you will need to turn on the history feature. Finally, you want to define a different prompt--one that includes some useful information or one that you define just for fun or to reflect your personality.
In this exercise, you will edit a .cshrc file by defining aliases, history, and a system prompt. Then, your custom settings will be stored permanently.
Instructions Part I
Log in to your course account.
In your home directory, use the vi editor to open a new file named .cshrc.
Create at least five aliases that you might find useful.
Start your command history by setting the history variable.
Change your prompt by setting the prompt variable.
When you are finished, save your changes and quit vi. Hint: Use vi’s :wq command.
Log out and log in again.
Notice the new system prompt, and observe that you can use the history feature.
Type the alias command and note the output. The aliases you stored in the .cshrc file should appear.
Log out when you are done.
List the aliases you decided to define and describe why they would be useful.
Exercise Hints
If the .cshrc file contains errors, such as typing mistakes or bad syntax, the C shell may produce error messages when it tries to read the .cshrc file. When you log in again after creating the file, check to see whether any unusual messages appear among the normal system messages. If so, you may need to fix mistakes in your .cshrc file.
Submitting your exercise
Type your answers directly into the text box provided. When you are finished, click
Submit
button to submit your exercise.