LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 06-07-2005, 10:09 AM   #1
pentalive
Member
 
Registered: Jun 2005
Location: Sacramento, CA
Distribution: Many, Old and New
Posts: 122

Rep: Reputation: 15
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.
 
Old 06-07-2005, 10:57 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,121

Rep: Reputation: 121Reputation: 121
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..
 
Old 06-07-2005, 11:37 AM   #3
Kdr Kane
Member
 
Registered: Jan 2005
Distribution: SUSE, LFS
Posts: 357

Rep: Reputation: 30
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.
 
Old 06-07-2005, 01:45 PM   #4
pentalive
Member
 
Registered: Jun 2005
Location: Sacramento, CA
Distribution: Many, Old and New
Posts: 122

Original Poster
Rep: Reputation: 15
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
 
Old 06-07-2005, 01:57 PM   #5
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,121

Rep: Reputation: 121Reputation: 121
Quote:
Originally posted by pentalive
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
Before removing any executables, have you poked around in /var and /tmp for any log and temp files to possibly remove first to save some space?
 
Old 06-07-2005, 02:44 PM   #6
pentalive
Member
 
Registered: Jun 2005
Location: Sacramento, CA
Distribution: Many, Old and New
Posts: 122

Original Poster
Rep: Reputation: 15
Smile

Quote:
Originally posted by trickykid
Before removing any executables, have you poked around in /var and /tmp for any log and temp files to possibly remove first to save some space?
trickykid... Strip only removes the debugging information from the executables. After stripping they still run the same way they always had. After Stripping there is just no debugging information (the names of the variables, subroutines addresses. so the debugger can show you things by name. (I don't know is the source code referenced in there so the debugger can say your on line 30 of foo.c? )

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.
 
Old 06-07-2005, 05:04 PM   #7
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
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
 
Old 06-07-2005, 05:58 PM   #8
pentalive
Member
 
Registered: Jun 2005
Location: Sacramento, CA
Distribution: Many, Old and New
Posts: 122

Original Poster
Rep: Reputation: 15
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.
 
Old 06-07-2005, 08:12 PM   #9
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,121

Rep: Reputation: 121Reputation: 121
Quote:
Originally posted by pentalive
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.
And that is only emacs.. some might be more or less..

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..
 
Old 06-07-2005, 08:46 PM   #10
pentalive
Member
 
Registered: Jun 2005
Location: Sacramento, CA
Distribution: Many, Old and New
Posts: 122

Original Poster
Rep: Reputation: 15
Hmmm this laptop is so old it don't have USB...

/var/log du -h 2.2M
 
Old 06-07-2005, 08:51 PM   #11
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,121

Rep: Reputation: 121Reputation: 121
Quote:
Originally posted by pentalive
Hmmm this laptop is so old it don't have USB...

/var/log du -h 2.2M
Seems to me then you might need a new drive if you need more space or maybe need a smaller distribution..

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..
 
Old 06-08-2005, 01:36 AM   #12
pentalive
Member
 
Registered: Jun 2005
Location: Sacramento, CA
Distribution: Many, Old and New
Posts: 122

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by trickykid
Seems to me then you might need a new drive if you need more space or maybe need a smaller distribution..

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..

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
 
Old 06-08-2005, 07:57 AM   #13
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,121

Rep: Reputation: 121Reputation: 121
Quote:
Originally posted by pentalive
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
Oh well, what would you like us to do then? Either suffer with limited space or get working on replacing the drive so you can actually save documents and files to it..
 
Old 06-08-2005, 08:00 AM   #14
Kdr Kane
Member
 
Registered: Jan 2005
Distribution: SUSE, LFS
Posts: 357

Rep: Reputation: 30
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.
 
Old 06-08-2005, 09:03 AM   #15
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,121

Rep: Reputation: 121Reputation: 121
Quote:
Originally posted by pentalive
file * | grep "notstripped" | {get the filename} | strip
Dude, seriously, it isn't that hard.. use xargs..

find * | grep <whatever> | xargs strip

Your {get the filename} means nothing when your using grep.. that's what grep is for..

And you should really run the strip command with the --strip-debug so your not removing symbols that might be necessary or helpful.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
3Gb of disk space lost! Disk space problem or mother board conflicts with HDD Mistreated Linux - Hardware 4 12-06-2004 03:58 PM
give limited space on hdd per user nukeu666 Linux - General 2 08-12-2004 06:48 AM
hosting: unlimited everything w/limited bandwidth/space.. miguetoo General 0 06-17-2004 09:49 PM
WineX shows limited drive space irfanhab Linux - Software 0 06-15-2004 02:27 AM
Installing Linux on limited disk space gilescarey Linux - Newbie 8 06-07-2004 06:07 AM


All times are GMT -5. The time now is 08:27 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration