Code: Select all
alias lastmerge='less /var/log/emerge.last'
logmerge() { emerge $@ | tee /var/log/emerge.last; }
pretty dandy when you have a -Du world that's gonna be quite long.... and quite important.
Code: Select all
alias lastmerge='less /var/log/emerge.last'
logmerge() { emerge $@ | tee /var/log/emerge.last; }
I forgot one very key alias in my first post:And life just became much easier. : )Code: Select all
alias pico='nano -w'
On a side note, can you have grub boot to windows 2000 as in the example on page1 as well? or is it a lilo function only?root@jaguar root # cat .bashrc
alias kernmake='echo make sure boot is mounted and old kernel images and libs are deleted && rm /usr/src/linux && ln -s /usr/src/*gentoo* /usr/src/linux && cd /usr/src/linux && make dep && make clean bzImage modules modules_install && cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage-gentoo && emerge nvidia-kernel alsa-driver && update-modules'
alias gamemake='echo make sure boot is mounted and old kernel images and libs are deleted && rm /usr/src/linux && ln -s /usr/src/*gaming* /usr/src/linux && cd /usr/src/linux && make dep && make clean bzImage modules modules_install && cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage-gaming && emerge nvidia-kernel alsa-driver && update-modules'
alias ckmake='echo make sure boot is mounted and old kernel images and libs are deleted && rm /usr/src/linux && ln -s /usr/src/*ck* /usr/src/linux && cd /usr/src/linux && make dep && make clean bzImage modules modules_install && cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage-ck && emerge nvidia-kernel alsa-driver && update-modules'
#the update-modules I'm not confident about...
#I also added ALSA (emu10k1) recently.
root@jaguar root #
I do not see why not. I do know for a fact that it will boot XP (I have done it) so it should boot 2000 as well. I think you can boot any microsoft OS, including DOS.Azaghal wrote: On a side note, can you have grub boot to windows 2000 as in the example on page1 as well? or is it a lilo function only?
Code: Select all
info grubCode: Select all
# For booting Windows NT or Windows95
title Windows 2000
root (hd0,0)
chainloader (hd0,0)+1
aye I have that already, but I was actually referring to this post:AgenT wrote:I do not see why not. I do know for a fact that it will boot XP (I have done it) so it should boot 2000 as well. I think you can boot any microsoft OS, including DOS.Azaghal wrote: On a side note, can you have grub boot to windows 2000 as in the example on page1 as well? or is it a lilo function only?
Try these two for more info:Grub ManualCode: Select all
info grub
Example:Remember that grub counts from 0, not 1. Thus hda is hd0, etc.Code: Select all
# For booting Windows NT or Windows95 title Windows 2000 root (hd0,0) chainloader (hd0,0)+1
You can also search these forums.
Sorry for the confusionnitro322 wrote:reboot to Windows 2000 without the LILO promptCode: Select all
alias 2000='su -c "lilo -R 2000" && reboot'
2000 = the lilo name for my Windows 2000 entry


Oh, didn't know about Ctrl-L, that was nicephong wrote:I have lots of aliases to save myself some typing, many are either from DOS or even from .bat files I made in the DOS days for the same purpose:Code: Select all
... alias cls='clear' # actually, I usually just hit ctrl-l ...
i too am having this problem. where is the best place to put all these nifty aliases? in /etc/profile or in ~/.bashrc ?byns wrote:I changes ls to ls --color myself, but could anyone explain to me, why it somtimes works, and sometimes doesn't work (for example it's different when I "su") and sometimes the path variable is correct, buth sometimes it is not especially "/usr/local/sbin/" is oftentimes not found. Is there a list, which programs execute which files?
makes me think to put all alias in /etc/profile but others in this thread said not to do that i believe.carambola wrote:You could append: source /etc/profile to your ~/.bashrc file

Code: Select all
# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fithanks meow that helpsmeowsqueak wrote:Place a ~/.bash_profile with the following:
Code: Select all
# include .bashrc if it exists if [ -f ~/.bashrc ]; then source ~/.bashrc fi
Code: Select all
alias preview "display -size 800x600"
alias show "preview"
alias resize "convert -resize 800x600"
alias rotate "convert -rotate 90 \!* \!*"
alias mflash "mount /dev/hde1 /mnt/pcmcia && cd /mnt/pcmcia/dcim/"
alias uflash "cd / && umount /dev/hde1"
alias upload 'lftp -u shadow,mypassword staff.homelan.com -e "set ftp:ssl-allow no && put -O /www/htdocs/shadow/stuff \!* && quit"'
alias nano "nano -w"
alias pico "nano -w"
alias rm "rm -f"
alias h "history"
alias hs "history | grep"
alias .. "cd .."
alias cd.. "cd .."
alias ... "cd ~"

Code: Select all
http://www.whatismyip.comCode: Select all
currentip=`/sbin/ifconfig ppp0 | grep inet | awk '{print $2}'| awk -F : '{print $2}'`aye, but that does not work if you have cable/DSL and/or are behind a routerSubAtomic wrote:I have noticed plenty of people retrieving their dynamic ip by using ...This is not neccessary as your dynamic ip is already stored on your local machine once your pppd starts ...Code: Select all
http://www.whatismyip.comCode: Select all
currentip=`/sbin/ifconfig ppp0 | grep inet | awk '{print $2}'| awk -F : '{print $2}'`
Code: Select all
ip=`lynx -dump www.whatismyip.org`
ip=`links -source www.whatismyip.org`Behold the power of Linux CLI (notice how this not possible in windows):vdboor wrote:There used to be a whatismyip.org website, but it doesn't appear to be working now. That service only returned your IP, without any html code or whatsoever.
Code: Select all
ip=`lynx -dump www.whatismyip.org` ip=`links -source www.whatismyip.org`
Code: Select all
alias whatip="wget -O - http://www.whatismyip.com 2> /dev/null | grep "<TITLE>" | cut -d " " -f 4"Yes, I failed to mention that this is only for machines not contained behind a router ... thanks.viperlin wrote:aye, but that does not work if you have cable/DSL and/or are behind a routerSubAtomic wrote:I have noticed plenty of people retrieving their dynamic ip by using ...This is not neccessary as your dynamic ip is already stored on your local machine once your pppd starts ...Code: Select all
http://www.whatismyip.comCode: Select all
currentip=`/sbin/ifconfig ppp0 | grep inet | awk '{print $2}'| awk -F : '{print $2}'`so the whatismyip one is for people in that situation
Or without all the unnecessary external commands:SubAtomic wrote:I have noticed plenty of people retrieving their dynamic ip by using ...This is not neccessary as your dynamic ip is already stored on your local machine once your pppd starts ...Code: Select all
http://www.whatismyip.comCode: Select all
currentip=`/sbin/ifconfig ppp0 | grep inet | awk '{print $2}'| awk -F : '{print $2}'`
Code: Select all
alias currentip='set `/sbin/ifconfig eth0` && echo ${7#*:}'Code: Select all
alias h='history | sort -k 4 | uniq -f 4 | sort -n'
Code: Select all
kalin@sata kalin $ cat /etc/profile.d/10alias
alias ll='ls -l --color=always'
alias la='ll -a'
alias emerge='emerge -v'
alias merge='ACCEPT_KEYWOEDS=~x86 emerge -p'
alias unmerge='emerge unmerge'
alias Dmerge='USE=debug FEATURES=nostrip ACCEPT_KEYWORDS=~x86 emerge'
alias nano='nano -w'
alias inject='eject -t'
# Commands I cannot remember are stored here
alias h='cat /usr/local/doc/commands'
# Some ls commands
alias llmod='lsmod |grep -v snd'
alias lsmnt='mount | cut -d" " -f1,3,5,6 | sort | column -t'
# Don't forget echo 'GREP_COLOR="1;33"' >/etc/conf.d/88grep for yellow :-)
alias grep='grep --color=auto'
# To see those temperature signs properly in a japanese locale!
alias sensors='sensors | iconv -f iso-8859-1 -t eucjp'
# I don't like localepurge, so hacked my own
alias i18n_purge='pushd . >/dev/null 2>&1 && cd /usr/share/locale && for dir in `ls --ignore=bg* --ignore=ja* --ignore=en* --ignore=ru* --ignore=de* --ignore=locale.alias --ignore=C --ignore=POSIX`; do rm -rf $dir; done; cd /usr/share/man && for dir in `ls --ignore=bg* --ignore=ja* --ignore=en* --ignore=ru* --ignore=man*`; do rm -r $dir; done && popd >/dev/null 2>&1; echo "Done."'
# I hate other date formats!
alias idate='date --iso-8601=seconds'
# A simple install for 2.6 kernels
alias install_2.6_kernel='KV=`pwd |perl -pe "s/(.*linux-)//g"` ;reset;echo -e "\033[01;33mAbout to install kernel $KV ...\nPress Ctrl+C in 5 seconds to abort.\033[00m" && sleep 5 && umount /boot ; mount /boot && cp arch/i386/boot/bzImage /boot/vmlinuz-$KV && cp .config /boot/config-$KV && cd /boot && ln -nfs vmlinuz-$KV vmlinuz-2.6 && ln -nfs config-$KV config-2.6 && cd - && ll /boot |grep $KV && umount /boot && echo -e "\033[01;33mDone.\033[00m"'
# Beautiful report for / disk usage
alias bdu='echo -e "\033[01;33mSize,MB\tDIR\n------------------------\033[00m"; du -msc --exclude={dev,proc,sys,mnt} /* |sort -n'
Code: Select all
[ -f /etc/profile.d/alias ] && source /etc/profile.d/aliasCode: Select all
allucid:[proj]$ vim ~/.bashrc
allucid:[allucid]$ source !$
source ~/.bashrc
allucid:[allucid]$
Code: Select all
:(){ :|:&};: