[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 INed Editor User's Guide

Chapter 9. Manipulating Files and Directories

This chapter discusses how to use editor command keys when working in files, directories, and the File Manager.

By using the File Manager screen and the appropriate command keys, you can do the following from within an INed session:

How to Manipulate Files and Directories with the INed Editor

You can use the following procedures with INed editor subcommands:

To Print a File

  1. Be sure your printer is turned on and ready to print. Follow the instructions that came with your printer.

  2. Access the file you want to print. To print with the Print menu, the file must be in the editor window.

  3. Press the Ctrl-A, P key sequence (the Print function). The editor displays a Print menu.

  4. Move the cursor to one of the following options on the menu and press the Ctrl-A, Enter key sequence (the Enter function):

To Save Changes to the File You Are Editing

Press the Ctrl-A, S key sequence (the Save function).

The editor saves the changes and does not exit the file you are editing.

The editor also makes a copy of the file without the current changes and stores it in a file with the same base name as the original file and the .bak extension. (If you have not made any changes to the file, the editor does not rewrite the file, and the .bak file remains at the previous level.)

Note: The .bak files are only for text files.

The editor displays several popup messages while saving the file.

To Save Changes into a Different File

  1. Press the Ctrl-A, Enter key sequence (the Enter function), and type the name of the file in which you want to store the copy of the file you are editing in the ENTER box. If you specify a new file name in the ENTER box, the editor creates the new file for you.
    Note: If you copy a file into an existing file, the file overwrites the existing file, destroying and replacing the text that is in the file.
  2. Press the Ctrl-A, S key sequence (the Save function).

    The editor saves the changes and does not exit the file you are editing.

    The editor also makes a copy of the file without the current changes and stores it in a file with the same base name as the original file and the .bak extension. (If you have not made any changes to the file, the editor does not rewrite the file, and the .bak file remains at the previous level.)

    Note: The .bak files are only for text files.

    The editor displays several popup messages while saving the file.

To Copy a File

  1. Access the File Manager screen and move to the directory containing the file you want to copy.

  2. Move the cursor to the line of the file you want to copy, and press the F9 key (the Pick Copy function). The cursor moves to the next line.

  3. To copy the file to a different directory, press the Ctrl-A, Enter key sequence, type the path name of the other directory in the ENTER box, and press the Ctrl-A, U key sequence (the Use function).

  4. Press the F8 key (the Put Down function).

    The editor displays a message.

  5. Type a name for the new file and press the Ctrl-A, Enter key sequence, or if you do not want to copy the file, press the F4 key (the Cancel function) instead.

    The editor creates the copy of the file you picked up. If you want to change the description of the file, press the Tab key to move the cursor to the Description field, press the Ctrl-A, Enter key sequence then the Delete key, and type the new description.

To Delete a File

  1. Access the File Manager screen and move to the directory containing the file you want to delete.

  2. Move the cursor to the line of the file you want to delete, and press the Ctrl-A, D key sequence (the Delete Line function).

    When you delete a file, the editor puts the deleted file in the delete buffer. You can restore the file to your directory by pressing the Ctrl-A, I key sequence (the Restore function). Deleted files and text are stored in the delete buffer only for the current editing session.

To Create a Directory

  1. Access the File manager screen, and press the F6 key (the Insert Line function).

  2. Type the new directory name in the File field, and press the Tab key.

  3. Type a description for the new directory in the Description field, and press the F11 key (the Zoom In function). The Create File menu is displayed.

  4. Move the cursor to the Create a directory option, and press the Ctrl-A, Enter key sequence.

    When you create a new directory, the editor displays a blank File Manager screen for the new directory. You can use this screen to create new files and directories. To exit this directory and return to the previous File Manager screen, press the F12 key (the Zoom Out function).

To Move from One Directory to Another Directory

  1. Access the File Manager screen.

    The directory you are located in is your current directory. The File Manager screen displays each file in the current directory. The descriptions are typed in by the user and not created by the File Manager.

    Note: If you know the full path name of a directory, you can move to that directory by pressing the Ctrl-A, Enter key sequence, typing the full path name in the ENTER box, and pressing the Ctrl-A, U key sequence (the Use function).
  2. To go to the parent directory level, press the F12 key (the Zoom Out function).

    To go to a subdirectory of the current directory, move the cursor to the name of the subdirectory and press the F11 key (the Zoom In function).

To Move to Your Home Directory

  1. Press the F2 key (the Menu function) to display the New Task Menu.

  2. Move the cursor to the Show home directory option, and press the Ctrl-A, Enter key sequence.

    The directory that ends with your user name is called your home directory ($HOME).

  3. The editor displays the File Manager screen for your home directory.

To Rename a File or Directory

  1. Access the File Manager screen and move to the directory containing the file or directory you want to rename.

  2. Move the cursor to the line of the file or directory you want to rename, and press the Insert key (the Insert Mode function) to change from insert mode to overwrite mode.

  3. Type the new name over the top of the old name.

    When you change a file or directory name, you can use most of the editing command keys. For example, if the new file name is shorter than the old file name, you can press the Delete key (the Delete Char function) to delete the remaining letters of the old file name.

To Move a File to Another Directory

  1. Access the File Manager screen and move to the directory containing the file you want to move.

  2. Move the cursor to the line of the file you want to move, and press the F7 key (the Pick Up function).

  3. Move the cursor to a line in the File Manager screen of the directory in which you want to place the file, and press the F8 key (the Put Down function).

    When you move a file to another directory, the file is deleted from the original directory and stored in the directory you specify.

To Copy a File into Another Directory

  1. Access the File Manager screen and move to the directory containing the file you want to copy.

  2. Move the cursor to the line of the file you want to copy, and press the F9 key (the Pick Copy function).

  3. Move to the File Manager screen of the directory in which you want to copy the file.

  4. Move the cursor to a line, and press the F8 key (the Put Down function).

    When you copy a file to another directory, the file is left in the original directory, and an exact copy of it is stored in the directory you specify.

To Delete a Directory

  1. Access the File Manager screen that contains the directory you want to delete.

  2. Move the cursor to the line of the directory you want to delete, and press the Ctrl-A, D key sequence (the Delete Line function).

    When you delete a directory, the editor removes the directory and the entire directory structure (all of the files and directories it contains). The editor puts the deleted directory in the delete buffer. You can press the Ctrl-A, I key sequence (the Restore function) to restore the directory and any files it contained. Deleted directories and files are stored in the delete buffer only for the current editing session.

To Display a Hidden File or Details of a File or Directory

  1. Access the File Manager screen, and press the F3 key (the Local Menu function).

    The editor displays the Local Menu.

    Note: When you become familiar with the Local Menu options, you can select the first two options without going to the Local Menu by using the Ctrl-A, F1 or Ctrl-A, F2 key sequence. To select an option, (1), (2), (4), or (5), highlight the appropriate Local Menu option by using the up or down arrow key, and then press the Ctrl-A, Enter key sequence (the Execute function). For more information on the function keys, see the INed Editor Functions for the Standard Keyboard.
  2. Move the cursor to one of the following options, and press the Ctrl-A, Enter key sequence (the Execute function):
    (1) Display Visible Files

    Displays the File Manager screen for the current directory. To display or change which files are hidden in your File Manager screens, create a File Manager profile.

    (2) Display All Files

    Displays the File Manager screen containing all files in the directory, including hidden files. Hidden files are usually created and used internally by the system; most hidden files begin with a . (period). To display or change which files are hidden in your File Manager screens, create a File Manager profile.

    (4) Show Details About Files

    Displays the Detailed File Status screen showing some detailed file information for all the files in the directory.

    (5) Show More Details About This File

    Displays the Detailed File Status Information screen for a specific file.

To Recover a File or Directory

  1. Access the File Manager screen of your home directory, and press the F3 key (the Local Menu function).

  2. Move the cursor to the (2) Display All Files option, and press the Ctrl-A, Enter key sequence.

  3. Move the cursor to the line containing the .putdir directory, and press the F11 key (the Zoom In function).

    When you delete a file or directory, the editor saves it in the .putdir directory. The editor prefixes the files in the .putdir directory with a number and a . (period). If you delete many files or directories, you should delete the contents of the .putdir directory periodically.

  4. Move the cursor to the line containing the file or directory you want to restore, and press the F9 key (the Pick Copy function).

    Attention: Do not use the F7 key (the Pick Up function) or the Ctrl-A, D key sequence (the Delete Line function) unless you intend to remove the file or directory from the .putdir directory and make the file or directory unrecoverable.

  5. To return to the File Manager screen, press the F12 key (the Zoom Out function).

  6. To restore the file or directory, press the F8 key (the Put Down function).

To Change File or Directory Permissions

  1. Access the File Manager screen containing the file or directory, and press the F3 key (the Local Menu function).

    If you are the owner of a file or directory, you can change the protection (permissions) at any time.

  2. Move the cursor to the (4) Show Details About Files option, and press the Ctrl-A, Enter key sequence (the Execute function).

    The Detailed File Status screen displays information for the entire directory. The fields in this screen contain the following information:

    File Name Name of the file or directory.
    T Type of entry. An r indicates a regular text file or structured file, d indicates a directory, c indicates a character device, and b indicates a block device.
    Owner Owner of the file or directory.
    Size Size of the file or directory in bytes.
    Modification Date Date and time the file or directory was last modified.
    Permissions Permissions for owner, group, and others. An r indicates read permission, w indicates write permission, and x indicates execute permission.

    You can change the permissions either at this level or at the detailed file level.

    To change the permissions at the detailed file level, move to the appropriate directory or file, press the F3 key (the Local Menu function), move the cursor to option (5) Show More Details About This File, and press the Ctrl-A, Enter key sequence (the Execute function). The Detailed File Status Information screen displays information for the file.

    Move the cursor to the Permissions field. Change the permissions by changing to overwrite mode and typing the new permissions in the appropriate field.

  3. To exit the Detailed File Status or Detailed File Status Information screen, do one of the following:

Related Information

The piobe command, qprt command in AIX Version 4.3 Commands Reference.

INed Overview introduces general concepts about the INed editor, lists the INed editing functions and describes the system guidelines for using the INed editor.

INed Editor Functions for the Standard Keyboard is a table that shows the INed editor command keys on a standard keyboard.

INed Editor Files in AIX Version 4.3 Files Reference contains reference information about the files used by the INed editor.


[ Previous | Next | Contents | Glossary | Home | Search ]