Linux.com

some more aliases

Posted by: Anonymous Coward on December 12, 2005 07:38 PM
I use this on gentoo:
alias update-system='sudo emerge --sync && update-eix && sudo emerge -avuD world'

rot13 and rot47 conversion:
alias rot13='tr A-Za-z N-ZA-Mn-za-m'
alias rot47='tr '\''!-~'\'' '\''P-~!-O'\'''

I also use these: (not strictly aliases but they work like aliases - for gentoo only. add them to your bashrc)

#Example: ifdown eth0
ifdown() {<nobr> <wbr></nobr>/sbin/ifconfig $1 down<nobr> <wbr></nobr>/etc/init.d/net.$1 stop
return 0
}

#Example: ifup eth0
ifup() {<nobr> <wbr></nobr>/sbin/ifconfig $1 up<nobr> <wbr></nobr>/etc/init.d/net.$1 start
return 0
}

#Example: service cupsd restart
# will execute<nobr> <wbr></nobr>/etc/init.d/cupsd restart
service() {<nobr> <wbr></nobr>/etc/init.d/$1 $2
return 0
}

#Example: serviceconf nfs
# will open the config for nfs on your favorite
# editor. (vim ofcourse, heh)
serviceconf() {
$EDITOR<nobr> <wbr></nobr>/etc/conf.d/$1
return 0
}

#

Return to CLI Magic: Daily aliases