-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Julien Moreau edited this page Apr 30, 2014
·
4 revisions
Welcome to the PixShellScripts wiki! It is the documentation of PixEye's shell scripts.
I get famous with those scripts when I was at the university (ISTY / UVSQ).
Here is a list of more interesting scripts with a short description:
- clean-old-kernels.sh - useful to clean /boot/ partition, it keeps only 2 Linux kernels
- ad2ldap.sh - import an LDIF file exported from an active directory (AD) with a mapping from AD to LDAP.
To be continued.
Example #1 (no kernel to uninstall):
$ clean-old-kernels.sh
Current kernel is.......: vmlinuz-3.11.0-17-generic
/ Installed kernels:
1 vmlinuz-3.11.0-15-generic
2 vmlinuz-3.11.0-17-generic
\ -> 2 kernels installed.
Last installed kernel is: vmlinuz-3.11.0-17-generic
There is no kernel to remove.
Example #2 (1 kernel to uninstall):
$ sudo ~/bin/clean-old-kernels.sh
Current kernel is.......: vmlinuz-3.11.0-20-generic
/ Installed kernels:
1 vmlinuz-3.11.0-18-generic
2 vmlinuz-3.11.0-19-generic
3 vmlinuz-3.11.0-20-generic
\ -> 3 kernels installed.
Last installed kernel is: vmlinuz-3.11.0-20-generic
Kernels to remove: 3.11.0-18.
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-headers-3.11.0-18* linux-headers-3.11.0-18-generic* linux-image-3.11.0-18-generic*
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
After this operation, 278 MB disk space will be freed.
Do you want to continue [Y/n]?
(...)