Limited Disk Space, Strip executables?
I am running Redhat 7.3 on an IBM thinkpad 385CD, Blackbox WM (x) for C programming development of console applications....
df -h says I only have about 382M left free (well that's not bad, but it could be better) I only have gnome installed and would like to squeeze more of KDE in. I'ts a laptop, replacing the hard drive is **hard** (It's not even behind an external door I would probably have to disassemble this puppy to change it) anyway. I seem to have a lot of executables that have not been stripped. Does anyone see any problem stripping all of them? Do you think it will be worthwhile to do so? Thanks! ron. |
df -h output please..
And stripping of all executables? You do realize that the majority that reside in /usr are ones that are probably necessary for your system to even function.. |
He means to strip out the debug information. I think.
I don't see any reason not to do that. Of course, I might not know a good reason to keep the debug information in the files. |
yup, strip removes the debugging information. I don't see myself debugging the 'ls' command.
Filesystem size Used Avail Mounted /dev/hda3 1.8g 1.4g 382m 79% / /dev/hda1 41m 32m 9.4m 78% /dos none 22m 0 22m 0% /dev/shm |
Quote:
|
Quote:
anyway deleting that sort of information from each executable leaves it running but somewhat smaller. My question is, Red Hat did not strip these before I got them, Is there any reason I can't? Is there something I am not thinking about? Thanks for the idea of checking my /var directory and other log files. |
you said it want make a difference, so do it, gentoo does, and i don't see any side effects
but i don't think you'll see a big space gain |
ls -lhS emacs emacs is 4.1 mb
strip emacs ls -lhS emacs emacs is 3.9 mb hmmm .2 mb per file? Emacs still runs ok. file * | grep "not stripped" | wc 492 8371 74325 492 lines... x .2mb each... = 98mb hmmm to strip or not to strip.... that is the question. I think I would do it if I could figgure out a single command line that would do it file * | grep "notstripped" | {get the filename} | strip argh! strip won't take filenames from standard input.. Stumped here. too much work otherwise. |
Quote:
Like I said before.. check /var and /log since you have one big / partition.. logs can grow.. especially if this is a laptop with lots of booting being done.. And if that's not the case, get a smaller distro if you don't want to get a bigger hard drive.. or buy an external usb drive.. or usb flash card.. they got those things with more space than your actual hard drive these days.. ;) |
Hmmm this laptop is so old it don't have USB...
/var/log du -h 2.2M |
Quote:
I've gotten Slackware down to like 400MB before.. but that was without X.. with X and a few apps, maybe add 100MB or so more.. |
Quote:
It won't be easy to replace the hard drive... I am running Red Hat 7.3 with the Blackbox wm, and some bits of gnome and kde installed (actually most of gnome and kdebase and kdegames |
Quote:
|
Take a look at the Linux from Scratch Book in section 5.36 page 95 and 6.60 on page 234. It's a free book.
For instance, it says do not use the "--strip-unneeded" on libraries as that will break static libraries. If I recall correctly, stripping removed about 700 MB for me at one point. |
Quote:
find * | grep <whatever> | xargs strip Your {get the filename} means nothing when your using grep.. that's what grep is for.. :rolleyes: And you should really run the strip command with the --strip-debug so your not removing symbols that might be necessary or helpful. |
All times are GMT -5. The time now is 11:00 PM. |