Http: // 203.208.37.132/search? Q = cache: e8evvowg0juj: cached
The compress command for File compression in UNIX is familiar to everyone. It has a high compression ratio. It is most appropriate to use it with the tar command for data backup. However, compress compression also has a disadvantage, that is, the compressed file must be decompressed with the uncompress command before it can be used properly. UseStripThe command does not solve this problem. It can clear unnecessary identifiers and debugging information in the execution file and reduce the file size without affecting normal use. However, unlike compressStripAnd cannot be restored, soStripIs a weight lossToolsInstead of CompressionTools. In additionStripAfter the file does not contain debugging information, you cannot use DBX to debug the program. Now let's take a look at the specific effect. Let's look at the following program:
# Include
Main ()
{
Printf ("Hello, world/N ");
}
Compiled with CC, the length is 46176 bytes.StripThen it is changed to 30648, which is fully reduced by 1/3 and can still be executed normally. BesidesStripIn addition, the use of shared libraries is also a way to reduce the execution file length.
Note:
1. If the file size is not reduced, it is alreadyStripPassed.
2. added the "-s" parameter during CC compilation, which has the same effect.
Some space-saving method:
That is, you can write a zexec script for a single large executable file. The script below is only for/usr/bin/CC
Uncompress./CC. Z
Mv cc/tmp
CD/tmp
./CC