Chroot » История » Версия 4
Андрей Волков, 2012-06-27 13:54
1 | 1 | Андрей Волков | h1. Chroot |
---|---|---|---|
2 | |||
3 | Проверка лишних библиотек: |
||
4 | <pre> |
||
5 | 3 | Андрей Волков | for NAME in /bin/* usr/bin/* /usr/local/bin/* /usr/local/libexec/* $(ldd /bin/* usr/bin/* /usr/local/bin/* /usr/local/libexec/* | grep = | awk '{print $3}' | sort | uniq); do file -b "${NAME}" -e elf | grep -q '^ELF ' && ldd $NAME; done | grep = | awk '{print $3}' | sort | uniq > /1 |
6 | find /lib /usr/lib /usr/local/lib -type f | grep -v -f /1 |
||
7 | 1 | Андрей Волков | rm /1 |
8 | </pre> |