Reconstructs previous versions of an INed structured file.
ghost OldName [ -d ] [ -p ] [ NewName [ Month/Day/Year [ Hour:Minute:Second ] ] ]
The ghost command reads a structured file and reconstructs a previous version of it in the output file. If you specify only the old file name using the OldName parameter, that will also be the name of the reconstructed version. The old file is backed up by appending a .bak file, making it the OldName.bak file.
Note: If your locale is not set to En_US, the date and time parameters may not be in the Month/Day/Year and Hour:Minute:Second format. The ghost command expects the date and time in the format specified by the current locale.
The Month/Day/Year parameter specifies a version date for the reconstruction. The Hour:Minute:Second parameter specifies the version time for the reconstruction. The default is the current date and time. If only the month and day are specified, the current year is assumed. If only the date is specified, the time is set to a value of 0 (midnight). If only the hour and minute are specified, the seconds are set to a value of 0. The hours are based on a 24-hour clock.
You can use the versions command to display the modification dates and times.
|-d||Deletes the .bak file after reconstructing the previous version.|
|-p||Includes versions prior to, but not including, the date and time specified.|
ghost menu2 newmenuThis is useful if the menu2 file is damaged.
ghost menu2The old file is saved as the menu2.bak file.
ghost menu2 newmenu 7/15
ghost menu2 newmenu 7/15/80 15:10
ghost menu2 newmenu 7/15/80 15:10:45This is useful if several changes were made to a file in a very short time.
The e command, history command, newfile command, readfile command, rmhist command, versions command.
INed Editor Overview in AIX Version 4.3 INed Editor User's Guide.
How to Access Previous Versions of a File with the INed Editor.