= Aliases alias disklist='lsblk -o NAME,HCTL,TYPE,SIZE,FSTYPE,LABEL,MOUNTPOINT,TRAN,VENDOR,PARTLABEL,RO' alias ipa='ip -brief addr' alias ipac='ip -brief -color addr' alias dns-reload='named-checkconf -z && rndc reload; sleep 2; grep named /var/log/daemon.log' alias epoch2date='perl -e '\''$t=shift; printf "%10s :%26s\n%10s :%26s\n%10s :%26s\n", "epoch", $t, "localtime", scalar(localtime $t), "gmtime", scalar(gmtime $t);'\''' alias iptlogview='perl -ne '\''if ( ($t,$m,$s,$d,$p,$sp,$dp)=/^(?:(\w{3}\s+\d+\s+[\d:]+)\s.*?) (.*?)\s+IN=.* SRC=(\S+) DST=(\S+).*PROTO=(\S+)(?: SPT=(\d+) DPT=(\d+))?.*/ ) {printf "%-15s %-18s %15s : %5d -> %15s : %5d %4s\n",$t,$m,$s,$sp,$d,$dp,$p} else {print};'\''' alias fwlog='tail -100 /var/log/ulog/syslogemu.log | iptlogview' alias croncheck='sleep $(( 60 - $(date +%S) + 5 )) && grep cron /var/log/syslog | tail' alias listconf='egrep -v "^(#|\$)" ' alias xcopy='xclip -selection clipboard' alias xpaste='xclip -o -selection clipboard' alias uri2txt='xclip -o -selection clipboard | perl -MURI::Escape -ne "print uri_unescape(\$_), qq(\n);"' alias dos2unix='perl -i -pe "s/\R/\n/g"' alias unix2dos='perl -i -pe "s/\R/\r\n/g"' alias mc='PROMPT_COMMAND="history -a; history -r" mc; history -r' {{tag>public bash linux}}