LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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
  Search this Thread
Old 06-08-2005, 12:21 PM   #16
pentalive
Member
 
Registered: Jun 2005
Location: Sacramento, CA
Distribution: Many, Old and New
Posts: 124

Original Poster
Rep: Reputation: 15

Quote:
Originally posted by trickykid
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.
Grep select the lines that have "not stripped" on them, they still have to be chopped up to get
the filename off the front. Perhaps awk or Perl to do that.

xargs... hmmm new command to me... Thanks.

the output of file looks like:

filename:lots of description.... not stripped.

needs to be turned into:

strip filename

-- I just looked at the xargs manpage.. so far it's greek, but that was just a glance. I'll also info
xargs and check other sources.
 
Old 06-08-2005, 12:42 PM   #17
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
There are many ways to do this but you'll probably want to make strip out the not stripped executables first from the list, then edit it so the list is only the path to the executable like this:

/usr/bin/pan
/usr/bin/xmms

And the like..

Or get your list of executables and do a for statement..


$ for blah in pan xmms; do strip -v --strip-debug /usr/bin/$blah; done

Or just give us an actual snippet of your list of executables.. and maybe someone is kind enough to show you how to do it..
 
Old 06-08-2005, 12:43 PM   #18
pentalive
Member
 
Registered: Jun 2005
Location: Sacramento, CA
Distribution: Many, Old and New
Posts: 124

Original Poster
Rep: Reputation: 15
Summary Thanks everyone

Alright everyone - Thanks for your help

To summarize:

I could strip all my executables (\bin \sbin and other places) and that could buy me
another 100mb or so. trickykid noted that I should use the --strip-debug so as to avoid removing non-debugging symbols (There are other symbols there?)

No one has said that stripping the executables would be a bad idea.

I have been sent to study xargs to see if it will help automate the stripping process,
besides it's a new command I have not used yet.

I have been sent to read some sections of the online book "linux from scratch"

I have noted that a replacement harddrive would be of help.
I have noted that there are some log files that could go. (about 2mb)


I now have some action items
 
Old 06-08-2005, 12:50 PM   #19
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Like I said previously, there are many different ways you can do this as I made a test file like this that had the path and executable on each line of what I wanted to strip:

/usr/bin/pan
/usr/bin/xmms

...and so on with several more..

And just by doing a cat testfile | xargs strip -v --strip-debug

Stripped all of the executables.. and yes, man strip for more details of what you can specify to strip out.. to be safe, I wouldn't strip by just using the default strip..
 
Old 06-08-2005, 12:55 PM   #20
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
But what I'm wondering is how big really is your /sbin /usr/sbin and such.. mine on my machine is currently:

7.4M /sbin
123M /usr/bin
12M /usr/sbin
4.4M /bin
7.4M /usr/local/bin

Which makes me still believe by stripping, your not really going to gain so much.. some of the executables I stripped that were only a few K in size didn't even make a difference after stripping them.

Oh well.. you do what you think is going to help.. personally, perhaps you should just uninstall programs you don't even use to save space.
 
Old 06-08-2005, 01:55 PM   #21
pentalive
Member
 
Registered: Jun 2005
Location: Sacramento, CA
Distribution: Many, Old and New
Posts: 124

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by trickykid
But what I'm wondering is how big really is your /sbin /usr/sbin and such.. mine on my machine is currently:

7.4M /sbin
123M /usr/bin
12M /usr/sbin
4.4M /bin
7.4M /usr/local/bin

Which makes me still believe by stripping, your not really going to gain so much.. some of the executables I stripped that were only a few K in size didn't even make a difference after stripping them.

Oh well.. you do what you think is going to help.. personally, perhaps you should just uninstall programs you don't even use to save space.

7.4M /sbin 9.1M
123M /usr/bin 118.0M
12M /usr/sbin 6.7M
4.4M /bin 5.9M
7.4M /usr/local/bin 6.5M

Since I use the machine for c source perhaps the 300mb is enough, for now.
 
  


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 On
HTML code is 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

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:22 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration