ls & rm with regular expression
e.g. rm -rf backup-20070[8-9]-* would delete : backup-200708-morning backup-200708-evening backup-200709-night backup-200709-latenight but not : backup-200706-morning backup-200707-afternoon backup-200711-midnight e.g. ls backup-20070[1-9] would list all backup starting from January to September but leave October, November & December out, of year 2007.
sed with multiple criteria
sed -e 1d -e 50d -e ‘/junks/d’ would remove first and 50th line & any line(s) with the word “junks”. update 20080821 : sed -e ‘/^$/d’ would remove every empty line
ssh client hang after a few minutes of inactivity
specify the parameter “ServerAliveInterval 60” in /etc/ssh_config or /etc/ssh/ssh_config. for more info, man ssh_config
Exim – anti-spam per domain setting
acl_check_rcpt: blah … blah … blah … deny message = rejected as $sender_host_address is blacklisted in $dnslist_domain\n$dnslist_text domains = domain-one.com : domain-two.com : domain-three.com dnslists = sbl-xbl.spamhaus.org blah … blah … blah … reference link : http://www.exim-new-users.co.uk/content/view/65/39/
screen in FreeBSD default to csh as suppose to bash (preferred)
After changing bash shell to a new user using chsh, screen needs ~/.bashrc for environment settings, which need “ln -s ~/.bash_profile ~/.bashrc”.
Recent Comments