Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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..
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)
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..
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.