Save Space with Tab Characters

unexpand The gzip () utility, and other utilities like compress, save space by squeezing text into a form that you can't read without uncompressing. If a file has lots of spaces in it - for example, columns with lots of space between them, or lines that are indented - you may be able to save space and keep the file readable too. Do that by changing the spaces to TAB characters with unexpand. If it's not on your system, get it from the tutorial.

How does it work? Article introduces TAB handling on UNIX. Each TAB character can replace as many as eight space characters. By default, unexpand only changes spaces to TABs at the left margin. With the -a option, it changes spaces wherever it can (without changing the column positions of any text, of course). Comparing ls -l listings of a file before and after unexpanding will tell you how much you've saved; the amount will vary file by file.

There are a few gotchas:

- JP