Month: September 2015
-
Automate key and mouse events in Linux (xev/xdotool)
If you need to automate a GUI app, like you would script a CLI app with expect, use xdotool. It should be in your repo. What you can do for example: ( gedit & ) ; sleep 1; for key in H e l l o Return W o r l d ; do xdotool…
-
Better less
Via reddit: -R allows ANSI colors (and other ANSI features) -S allows horizontal scrolling (I don’t use this one with query-logs though) -X Leaves the output on the screen after exiting. I mostly use this one out of habit, since I use less as a pager in the CLI mysql program -M More detailed status…
-
*nix shorter/better commands (grep/wc/cat) from Useless Use of Cat Award
From http://www.smallo.ruhr.de/award.html , dome things to improve in your (and my) scripts ;). Anything that looks like something | grep ‘..*’ | wc -l can usually be rewritten like something along the lines of something | grep -c . # Notice that . is better than ‘..*’ or even (if all we want to do…
-
Regenerate grub2
Note to self; if I have changed /etc/sysconfig/grub, then run grub2-mkconfig -o /boot/grub2/grub.cfg For uefi: grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
-
No memory reserved for crash kernel
“No memory reserved for crash kernel” on RH7 Increase RAM to 2GB+. Also make sure crashkernel=auto is set in your cmdline.