Output a simple overview of an ELF executable through the calling file
, readelf
, hd
, size
, objdump
, ldd
, and strings
. This is easier to run than remember the command-line switches, while some tools (objdump
and readelf
) can produce subtly similar outputs.
Another use of elf_overview.sh is to verify that files such as PDFs are authentic and not masquerading as executables.
./elf_overview.sh <file> | less
Protect a critical application from being killed first by the Linux kernel's OOM Killer.
- The critical app on a limited-budget web server might be MySQL.
- A runaway PHP script, operating through an Apache process, triggers the OOM.
- But MySQL – using the most memory – is ungracefully killed first, before Apache. The untimely death of MySQL creates database and sales problems.
OOM_protect.sh aims to stop the above happening.
(So might the database and web server residing on separate servers.)
-
chmod 700 OOM_protect.sh
-
set
APP
variable path in the script's CONFIG section. -
sudo ./OOM_protect.sh
Gnome / Nemo desktop icon position restore.
A Python script to generate a bash script recording desktop icon positions. When desktop icon positions are lost, such as through connecting/disconnecting a second monitor or enacting 'Sort Desktop items by Name', executing the bash script restores the icon positions.
Place script in ~/Desktop folder.
python3 icon_save
or
./icon_save
- ensure Desktop 'Auto-arrange' is off
./icon_restore
- show Desktop
- press F5
Scripts are released under the GPL v.3.