Ensure Beaver Log Shipping is Running
I have a love hate relationship with the beaver log shipper and ensuring that it is in fact running on all of my machines (and not in a defunct or partially running state) I have finally whipped up a script…
I have a love hate relationship with the beaver log shipper and ensuring that it is in fact running on all of my machines (and not in a defunct or partially running state) I have finally whipped up a script…
Here’s a handy alias for shredding files on CentOS alias shred=’shred -v -n 1 -z -u’
alias chkconfig=”chkconfig | perl -pe ‘use Term::ANSIColor; s/\bon\b/color(\”green\”).on.color(\”reset\”)/ige;'” or to permit passing an agrument: function chkconfig(){ /sbin/chkconfig $* | perl -pe ‘use Term::ANSIColor; s/\bon\b/color(“green”).on.color(“reset”)/ige;’ }
nano syntax highlighting This article describes how to get syntax highlighting in the command line emacs editor “nano“ Ubuntu zcat > ~/.nanorc sed -i ‘s|# include|include|g’ ~/.nanorc Centos/Redhat cp ~/.nanorc sed -i ‘s|# include|include|g’ ~/.nanorc
Installation Modify ~/.bashrc and append this line PS1=”\n\[\e[32;1m\][\[\e[37;1m\]\u@\h:\[\e[37;1m\]\w\[\e[32;1m\]]\\$ \[\e[0m\]” My Bash Prompt To replace yours in one command with this one sed -i ‘s~PS1.*~PS1=”\\n\\[\\e[32;1m\\][\\[\\e[37;1m\\]\\u@\\h:\\[\\e[37;1m\\]\\w\\[\\e[32;1m\\]]\\\\$ \\[\\e[0m\\]”~g’ ~/.bashrc
To setup email on Centos 6 run these commands yum -y install sendmail mailutils chkconfig –levels 235 sendmail on service sendmail restart To send a test email echo “test message” | mail -s “test subject” myemail@example.com Hosts File Modify your…
Add Current PATH to crontab Are you sick of your cron job failing because you are not explicitly listing the full path of everything in your shell script? Here’s how to fix it! Problem Your script works when you run…
How to create a bash script that deletes itself This script will delete itself via the shred command (secure deletion) when it exits #!/bin/bash # # Author: Steve Stonebraker # Date: August 20, 2013 # Name: shred_self.sh # Purpose: securely…
To fix the infinite scrolling issue with byobu and Ubuntu precise install it the following way: apt-get install byobu echo “at the next prompt select ‘screen’ as the backend” byobu-select-backend
Recently I needed to calculate the starting and ending memory addresses of an IOS application (in order to dump it). As a result i needed to figure out how to add two hex addresses. Here’s what I discovered. Basic Example…