Garbage Command [GAR]
Finds and recovers wasted space in the current workfile.
GARBAGE
(Q = no summary)
If you keep adding lines to a workfile and editing them, eventually you will get an “Error: Full” message in Line mode or “File nearly full!” in Visual mode, and be unable to add more lines. One method of continuing at this point is to use the Garbage command.
/garbage /gar {minimal command name}
Garbage combines partially full blocks to squeeze out free blocks, but it also searches the workfile for any blocks that have been “lost” (i.e., are no longer on the “free list” or the “text list”). Garbage does not release extents, nor does it reduce the EOF. It does not make your file any smaller, it just allows you to continue editing by finding usable space within the file.
Garbage prints a summary of how much space it recovered and how much is available in the file. The summary report can be suppressed using GarbageQ.
5 blocks squeezed out, 2 found, 55 used, 10 on free list, 9 for expansion.
In this example, Garbage reports that 5 blocks were retrieved via squeezing, 2 lost blocks were found, 55 blocks are currently used to hold text, 10 empty blocks are held on a “deleted-block” list (the free list), and 9 blocks are available if the EOF is expanded toward the LIMIT.
Expanding Your File
If you need still more space, you should build a bigger file using the Text command. Text creates a workfile with room to add more lines.
/open crept23 /add 5.11 this is a new line Error: Full /shut {close the file that is too small} /text * {text Crept23 into larger Qeditscr} /shut * {rename as new Crept23, purge old} /open * {open new big file and edit...} /add 5.11 this is a new line
Compressing Your File
If you want to compress your file into minimal disc space because you are through editing it, use Garbage to minimize the number of blocks, then use New to build a new smaller file, deriving the number of lines from a Verify Open of the old file, and copy the old file into the new with Text:
/open crept99 /garbage {minimize number of blocks} /verify open {find out number of lines in file} /shut saveold {rename file as Saveold} /new crept99 (2900) {build new, smaller file} /text saveold {copy old file into new}