Page 1 of 1

GNU binary utility - Strip [SOLVED]

Posted: Thu Dec 22, 2022 2:34 pm
by Jasper

Hi there

Can someone tell me who I can use this command to apply to a directory?

Presently, I am having to do this files individually.

Thanks in advance :thumbup:


Re: GNU binary utility - Strip

Posted: Fri Dec 23, 2022 2:43 pm
by mistfire
Jasper wrote: Thu Dec 22, 2022 2:34 pm

Hi there

Can someone tell me who I can use this command to apply to a directory?

Presently, I am having to do this files individually.

Thanks in advance :thumbup:

Strip command removes some symbols on ELF binaries. This will reduce the file size
It only works on ELF executables and library files

To strip files

Code: Select all

find <folder> -type f | xargs -i strip --strip-unneeded '{}'

To strip library files

Code: Select all

find <folder> -type f -name "*.so*" | xargs -i strip --strip-unneeded '{}'

To strip kernel modules

Code: Select all

find <folder> -type f -name "*.ko" | xargs -i strip --strip-unneeded '{}'

Re: GNU binary utility - Strip

Posted: Fri Dec 23, 2022 5:49 pm
by Jasper

@mistfire

Thank you so much for sharing the knowledge.

I will be honest, I did a system-wide strip of the relevant directories. Of course, their were some files that were not recognised but in the whole it worked.

I did have to load up the DevX file in order to do so.

Also, I could not shut down normally and had to resort to a physical power down. This wasn't a big deal as I knew I would be given the option to "save" which I did.

Rebooted and everything appears to be working so far. The only issue is that I have a menu entry "Glade" left over. I can live with that :lol:

**EDIT** Fix Menus cleaned up the menu entries :thumbup2: