Editor Exercises

  1. Create a directory under your home directory called editor_practice. Make sure you understand the file specification for this new file. Set your current directory to this new directory and verify you were successful.

  2. Copy the file /etc/passwd to this new directory naming it my_passwd. Verify you were successful.

  3. Use the vi editor to accomplish the following:

    • open the my_passwd file you just copied
    • practice moving around in the editor using the navagation keys (not the arrow keys)
    • search for your entry within this file, either by username or lastname
    • once you have located your entry, cut this line and move it to the first line of the file
    • practice moving other lines or blocks of text from this file around

  4. When you are sufficiently comfortable moving about and using the editor, save your changes and exit the editor.

  5. Verify that you have saved your changes by verifing the date has changed on the file.

  6. Now delete the my_passwd file. Verify you were successful.

  7. Move back to your home directory and delete the editor_practice directory. Make sure you understand how to do this with both absolute and relative file specification. Verify you were successful.

  8. Practice the above until you are sure you are comfortable with and can easily accomplish these tasks.

©2003-2004, Mark A. Thomas. All Rights Reserved.