Skip to content

Instantly share code, notes, and snippets.

@joeflateau
Last active September 11, 2020 14:57
Show Gist options
  • Save joeflateau/5025870b2dbe5bf31643b844eef1cc6c to your computer and use it in GitHub Desktop.
Save joeflateau/5025870b2dbe5bf31643b844eef1cc6c to your computer and use it in GitHub Desktop.
function umountsmbfs(){
for D in `mount -t smbfs | sed 's/.* on \(.*\) [(].*/\1/'`; do umount $D; done; mount;
}
function sawtailf(){
group=$1
hours=$2
if [ -z "$hours" ]; then
hours=1
fi
saw get $group --pretty --start -${hours}h
saw watch $group
}
function ec2_tail_user_data() {
ip=$1
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ec2-user@$ip -t "tail -f /var/log/user-data.log"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment