Here's an example. I'll compile a C program and list it. Then I'll strip it and list it again. How much space you save depends on several factors, but you'll almost always save something.
If you know that you want a file stripped when you compile it, use cc with its -s option. If you use ld -say, in a- use the -s option there.
Here's a shell script named stripper that finds all the unstripped executable files in and strips them. It's a quick way to save space on your account. (The same script, searching the whole filesystem, will save even more space for system administrators - but ):
Thefinds all executable files that and runs to get a description of each. The sed command skips shell scripts and other files that can't be stripped. sed searches for lines from file like:
with the word "executable" followed by "not stripped"-sed removes the colon, tab, and description, then passes the filename to strip .