Posts Tagged bash

iptables fun and games

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.

, , ,

No Comments

find/xargs/grep tricks

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 […]

,

No Comments