If you have difficulty remembering commands, use alias! This is just
some example i compiled to help a friend with linux

Append the following to your homedir   ~/.bashrc


# ==============================================================
alias pause='read -n 1 -p "Press any key to continue..."'

#HARDWARE
alias {eject}='umount /disk/media'

#INTERNET
alias {vnc,rdesk}='xtightvncviewer -viewonly -quality 3'
alias mirror='wget -l1 -F -L -k -c -r'
alias {youtube,google,googlevideo,dl,video}='echo "[CMD:clive -c -f]
[-f:flv,3gp,mp4?] ";clive -c -f'
alias {scan}='nmap -A -v'
#---Messenger
alias {msn,yahoo,skype,facebook,otr}='amsn;pidgin'

#EDITOR
alias edit='gedit'
alias notepad='edit'
alias config='gedit ~/.bashrc'

alias {explorer,computer,mycomputer,filesystem,drive}='echo
"-----EXECUTING AS ROOT------";sleep 3;sudo gksu nautilus /'

#GENERAL COMMANDS
alias ll='ls -lhart'
alias la='ll'
alias sl='ll'
alias l='ll'
alias s='ll'


alias {clr,cls}='screen -Rd'
alias ipconfig='ifconfig'
alias df='df -h'
alias du='su -sh *'
alias {mem,free,memory}='echo "IN MEGABYTES!"; free -l -m -s 1'
alias {proc,process,taskmgr,taskview}='top;ntop'
alias {dir}='ls -la'
alias {shred,remove,del}='shred -uzvf'
alias ipv6='gedit /etc/modprobe.d/aliases'


#History, top 100: cut -f1 -d" " ~/.bash_history | sort | uniq -c |
sort -nr | head -n 100
alias 
{h,histry,pastcmd,pastcommand,typedcommand,lastcommand,lastcmd,oldcmd,oldcommand}='history'



extract () {
   if [ -f $1 ] ; then
       case $1 in
           *.tar.bz2)   tar xvjf $1    ;;
           *.tar.gz)    tar xvzf $1    ;;
           *.bz2)       bunzip2 $1     ;;
           *.rar)       unrar x $1       ;;
           *.gz)        gunzip $1      ;;
           *.tar)       tar xvf $1     ;;
           *.tbz2)      tar xvjf $1    ;;
           *.tgz)       tar xvzf $1    ;;
           *.zip)       unzip $1       ;;
           *.Z)         uncompress $1  ;;
           *.7z)        7z x $1        ;;
           *)           echo "don't know how to extract '$1'..." ;;
       esac
   else
       echo "'$1' is not a valid file!"
   fi
 }



# Package management aliases
alias install='sudo aptitude install'
alias reinstall='sudo aptitude reinstall'
alias uninstall='sudo aptitude purge'
alias update='sudo aptitude update && sudo aptitude full-upgrade'

#alias clean='dpkg -l|grep "^rc"| awk "{print \$2}" | xargs -r sudo
aptitude purge -y && sudo aptitude autoclean && sudo deborphan -Z &&
sudo localepurge'

alias {badcopy,bcopy}='dcfldd if=/dev/cdrom of=/usr/2003/$1.iso
bs=1024k conv=noerror'

#============================================================================================================================================

-- 
FOSS Nepal mailing list: [email protected]
http://groups.google.com/group/foss-nepal
To unsubscribe, e-mail: [email protected]

Mailing List Guidelines: 
http://wiki.fossnepal.org/index.php?title=Mailing_List_Guidelines
Community website: http://www.fossnepal.org/

Reply via email to