Reply to comment

04 01.2010

Aliases

Quick and dirty collection of useful aliases for bash

 

Edit ~/.bash_aliases

# aliases

# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
    eval "`dircolors -b`"
    alias ls='ls --color=auto'
    #alias dir='ls --color=auto --format=vertical'
    #alias vdir='ls --color=auto --format=long'
fi

# some more ls aliases
alias l='ls -CF'
alias ll='ls -l'
alias llh='ls -lh'
alias la='ls -A'
#saves time on mistakes
alias sl='ls'

#standard iso date formats
alias dt="date +'%Y-%m-%d'"
alias tm="date +'%H:%M:%S'"
alias dts="date +'%Y-%m-%d_%H:%M:%S'"

#shorts for apt-get
alias apt='sudo apt-get install '
alias purge='sudo apt-get remove --purge '

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Internal paths in double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or relative path.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.