User Tools

Site Tools


aliases

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
aliases [2019-10-11 12:25:25]
mi created
aliases [2024-06-05 23:26:01] (current)
mi
Line 3: Line 3:
 <file bash bash.morestuff>​ <file bash bash.morestuff>​
 alias disklist='​lsblk -o NAME,​HCTL,​TYPE,​SIZE,​FSTYPE,​LABEL,​MOUNTPOINT,​TRAN,​VENDOR,​PARTLABEL,​RO'​ 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 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 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 ​ %-16s  %15s : %5d -> %15s : %5d    %4s\n",​$t,​$m,​$s,​$sp,​$d,​$dp,​$p} else {print};'​\'''​+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 fwlog='​tail -100 /​var/​log/​ulog/​syslogemu.log | iptlogview'​
  
Line 16: Line 21:
  
 alias uri2txt='​xclip -o -selection clipboard | perl -MURI::​Escape -ne "print uri_unescape(\$_),​ qq(\n);"'​ 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' alias mc='​PROMPT_COMMAND="​history -a; history -r" mc; history -r'
/docs/dokuwiki/data/attic/aliases.1570789525.txt.gz ยท Last modified: 2019-10-11 12:25:25 by mi