Posts Tagged bash
iptables fun and games
Posted by Kyle Lexmond in Linux, Sysadmin on September 28, 2012
Note to self: When configuring iptables, don’t copy + paste /sbin/iptables -F /sbin/iptables -P INPUT DROP <bunch of other commands> into bash. I had A Bad Time.
find/xargs/grep tricks
Posted by Kyle Lexmond in Uncategorized on February 3, 2011
Because xargs will die if you have an unescaped quote, but using -0 screws everything up if you’re reading a list of files: sed s/\’/\\\\\’/|cut -d \: -f 1|xargs -i rm “{}” The sed pattern will put the escape character in front of any single quotes so that xargs doesn’t screw up. Using md5sum to […]