OpenWindows User's Guide

Working with an Existing File

You can open (load) any standard ASCII text file into the Text Editor and then modify the current file, or change the name of the file to create a new file, which leaves the original file intact. To load a file from your file system into Text Editor:

  1. Choose File -> Open from the Text Editor control area.

    You see the Text:Open window.

  2. Select and open the file.

    The file you have specified is displayed in the Text Editor window. For complete information on opening a file, refer to Chapter 1, Introduction to the Solaris User Environment.

Saving the Existing File

You can now edit the existing file and either save your changes in that file, or save it as a new file. To modify the file, see "Editing Files". To save the changes to the existing file, do the following:

    Choose File -> Save from the Text Editor control area.

The file is automatically saved.

Because UNIX does not allow two documents with the same name in one directory, when you make a copy of a document in the same directory the original file is automatically saved to a backup file and renamed with a % suffix. For instance, a file named messages would automatically be renamed messages%. The next save overwrites the existing backup file rather than creating a second backup. Figure 3-8 shows the two files displayed as icons in File Manager.

Figure 3-8 Edited File and Backup File with a % Suffix


Note -

If you do not want to retain the original, delete the file with the % suffix by pressing SELECT on the icon in File Manager and dragging it to the Wastebasket.

Saving the Modified File as a New File

To keep the original file intact and create a new file with the modifications, do the following:

  1. Choose File -> Save As.

    You see the Text:Save As window.

  2. Name and save the new file.

    The file is stored in the designated directory and file. For complete information on saving a file, refer to Chapter 1, Introduction to the Solaris User Environment.