Results 1 to 10 of 11
We all have them. Aliases. And I'm curious, what aliases do you use?
Who knows, might even give a few good ideas
Well, I guess I have go go first. ...
- 09-17-2010 #1
Post your `alias`
We all have them. Aliases. And I'm curious, what aliases do you use?
Who knows, might even give a few good ideas
Well, I guess I have go go first. These are some of mine:
Code:alias renet="/etc/rc.d/rc.inetd restart && /etc/rc.d/rc.inet1 restart" alias ll="ls -lh" alias la="ls -a" alias lk="ls -B" alias lla="ls -alh" alias lss="ls -gGShr" alias df="df -h" alias du="du -h" alias grep="grep --color=auto" alias clr="clear ; fortune -as" alias ping="ping -c 4" alias scrash="screen bash" alias beep="play /usr/share/sounds/KDE_Window_Open.wav &> /dev/null" alias dir="echo Do people still use that ancient relic from what... 1994 or so?" alias mnt="mount|grep -v .zfs"
Can't tell an OS by it's GUI
- 09-17-2010 #2
I have these.
only two of which I set upCode:alias canhaz='sudo apt-get install' alias cansee='sudo apt-cache search' alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto'
example: canhaz sauerbratenLast edited by elija; 09-17-2010 at 05:23 PM.
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 09-17-2010 #3
Au! Elija, I'm very mad at you
There's coffee all over my screen
lol
Code:IM in ur PROFILE looking AT ur ALIAS { for ALIAS in PROFILE do ROFL kthnx } KTHNXBYECan't tell an OS by it's GUI
- 09-17-2010 #4
I have:
alias ls='ls --color=auto'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias cdd='cd /home/data'
/home/data is the "My Documents" partition, shared between Crux and Debian."I'm just a little old lady; don't try to dazzle me with jargon!"
- 09-17-2010 #5
Mine plus a function.
Code:alias in='sudo clyde -S' alias up='sudo bauerbill -Syu --rebase' alias upp='sudo clyde -Su --aur' alias re='sudo pacman -Rcsn' alias play="DISPLAY=:0 mplayer -fs" alias wbur='mplayer http://wbur-ogg.streamguys.com:80/wburlive.ogg' alias back='cd $OLDPWD' alias ..="cd .." alias ...="cd ../.." alias ....="cd ../../.." alias .....="cd ../../../.." alias ......="cd ../../../../.." extract () { if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xvjf $1 ;; *.tar.gz) tar xvzf $1 ;; *.bz2) bunzip2 $1 ;; *.rar) rar 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 }
- 09-21-2010 #6
Here's mine at work
You must all pity me.Code:Microsoft Windows [Version 5.2.3790] (C) Copyright 1985-2003 Microsoft Corp. U:\>alias 'alias' is not recognized as an internal or external command, operable program or batch file. U:\>
My cygwin has this:
Code:# alias alias gvim='"/cygdrive/c/Program Files/Vim/vim72/gvim.exe"' alias less='/bin/less -r' alias ls='/bin/ls -F --color=tty --show-control-chars' alias vi='"/cygdrive/c/Program Files/Vim/vim72/gvim.exe"' alias vim='"/cygdrive/c/Program Files/Vim/vim72/gvim.exe"'
Linux user #126863 - see http://linuxcounter.net/
- 09-21-2010 #7Mine isn't much different I'm afraid.
Originally Posted by Roxoff
Mine doesn't even know `ls`
Also part of my profile, with different machinenames having different machine colours, my main account gets a green prompt, the root account gets a red prompt, and all other accounts a yellow one.
Note also how I've never decided whether to use en-US or en-UK
Code:################################################ # IMPORT COLORS (where available) if [ -f /etc/colors ] ; then . /etc/colors MACHINECOLOR="$BROWN" else NAMECOLOR="31m" MACHINECOLOR="36m" fi ################################################ # Setting fancy prompts if [ "`id -u`" = "0" ]; then NAMECOLOR="$RED" elif [ $UID = "1000" ] ; then NAMECOLOR="$GREEN" else NAMECOLOR="$YELLOW" fi PS1="\[\e[${NAMECOLOR}\]\l \u\[\e[${MACHINECOLOR}@\]\h:\w \$\[\e[$CEND\]"
They wont work unless you define colours:
Code:# /etc/colors # To get the escape character in Vim, in insert mode press # [ctrl]+[V] ESC="^[[" CEND="${ESC}0;00m" BLACK="${ESC}0;30m" RED="${ESC}0;31m" GREEN="${ESC}0;32m" BROWN="${ESC}0;33m" BLUE="${ESC}0;34m" PURPLE="${ESC}0;35m" CYAN="${ESC}0;36m" GRAY="${ESC}0;37m" LBLACK="${ESC}1;30m" LRED="${ESC}1;31m" LGREEN="${ESC}1;32m" YELLOW="${ESC}1;33m" LBLUE="${ESC}1;34m" LPURPLE="${ESC}1;35m" LCYAN="${ESC}1;36m" WHITE="${ESC}1;37m"
It never occurred to me that you could get working functions in your profile, but indeed, why not? It's so easy. For example:
Code:warp() { if [ ! $1 ] then echo "Warp where?" else case $1 in www) cd /var/www/htdocs ;; rc) cd /etc/rc.d ;; log) cd /var/log ;; src) cd ~/src ;; esac fi }Can't tell an OS by it's GUI
- 09-22-2010 #8
Cool,I never thought alias will be such a valuable stuff .thanks for this useful post!!! now i added my first custom alias-
alias yinstall ="yum -y install"- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 09-22-2010 #9Linux User
- Join Date
- Jan 2006
- Posts
- 414
Guess who makes regular typo's?alias maek='make'
- 09-22-2010 #10Well, I had a feeling this could turn out useful. I always thought that I could do more with it but I could never really quite lay the finger on it...
Originally Posted by Lakshmipathi
But like Hazels cautious ' -i' flag on commands, that can be a lifesaver. Elija's canhaz had me rolling of my cough with tears in my eyes of laughing
and reed9's... it never occurred to me you could define functions. That's so cool
there's no limit to what you can break^H^H^H^H^Hdo with a function!
Eh... To quote Louis XIV: "Le typo, c'est moi"
Originally Posted by darkrose0510 Can't tell an OS by it's GUI


Reply With Quote
