May 2014
Intermediate to advanced
150 pages
3h 18m
English
Aliases are a way of effectively assigning a name to a given collection of commands or a single command line. The .bashrc file that comes with every standard issue bash shell includes a few useful ones by default. A few of them are as follows:
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'What these do is allow you to use one—usually simpler—command to invoke a number ...
Read now
Unlock full access