Lazy

Brad just mentioned he'd finally adopted some of my incredibly lazy shell aliases. This is stuff like:

alias acs="apt-cache search"
alias acsh="apt-cache show"
alias acsno="apt-cache search --names-only"
alias d="du --si --max-depth=1"
alias e="gvim"
alias g="grep"
alias H="head"
alias ip="ipython"
alias L="less"
alias more="less" # (More or less.)
alias :q="exit"
alias s="sudo"
alias sagi="sudo apt-get install"
alias sagr="sudo apt-get remove"
alias sagu="sudo apt-get update"
alias se="sudo gvim"
alias sl="ls" # Crash that fscking train
alias syslog="sudo tail -f /var/log/syslog"
alias stf="sudo tail -f"
alias sv="sudo vim"
alias sx="sudo xm"
alias tf="tail -f"
alias tov="echo tov is dead. Try codd"
alias v="vim"
alias zl="zless"

I've yet to see whether he's using my favourite:

alias :w='echo \"$PWD\" "$RANDOM"L, "$RANDOM"C written'

In other news, congratulations to my brother who got his A-level results today. He'll be heading to Durham University in October. Well done, Brother John.

Comments (3)

Thanks, I'll use a few of those.

Here's some of mine. (I also have a load of functions for various more complicated things.)

<code>
# cd (u=up, b=back)
alias c='cd'
alias u='cd ..'
alias uu='cd ../..'
alias uuu='cd ../../..'
alias uuuu='cd ../../../..'
alias b='cd -'

# ls
alias l='ls -h --color=always'
alias ls='ls -h --color=always'
alias ll='ls -hl --color=always'
alias la='ls -hA --color=always'
alias lla='ls -hlA --color=always'

# du (summary)
alias dus='du -sh *'

# clear (may be from DOS but it's easier to type)
alias cls='clear'

# gvim
alias e='gvim'
alias e.='gvim .'

# mkdir
function md {
mkdir "$1" &amp;&amp; cd "$1"
}
</code>

Aug. 23, 2007, 3:23 p.m. #
lamby

Thanks for your input, Dave.

By the way, --color=always is evil. You should probably be using 'auto', the LS_COLORS environment, and/or fix your terminal. :)

Aug. 23, 2007, 6:53 p.m. #

Noted... but I've never had problems, and I can do things like "ls | grep ___" and still get a colour-coded result... unless you know a better way?

Aug. 27, 2007, 8:49 p.m. #