######################################################################## # ~/.aliases # # Type 'alias' to get a list of all current aliases. # # As with '~/.cshrc', if you modify this file, you must type # # source ~/.aliases # # to have changes take effect in the current shell ######################################################################## ######################################################################## # Define an abbreviation for the history command, which produces a list # of your previous commands. ######################################################################## alias hi history ######################################################################## # List directories in columns (-C) and use special characters to # show directories (/), executable files (*), and symbolic links (@) # # Note the use of single quotes (') to create an alias which expands # to more than one word. ######################################################################## alias ls 'ls --color=auto -CF' ######################################################################## # Be cautious (prompt user) when removing or overwriting files ######################################################################## alias rm 'rm -i' alias cp 'cp -i' alias mv 'mv -i' alias ln 'ln -i' ######################################################################## # Then define some aliases which aren't cautious: i.e. so you # can type 'RM foo' when you know you really want to clobber 'foo' ######################################################################## alias RM '/bin/rm' alias CP '/bin/cp' alias MV '/bin/mv' alias LN '/bin/ln' ######################################################################## # Make 'mail' and 'Mail' synonyms ('Mail' is much more user-friendly than # 'mail' :-) ) ######################################################################## alias mail 'Mail' ######################################################################## # Advanced: The following alias comes close to being a new command. # 'wa' stands for 'which alias': an alias I find useful since # I have so many aliases! Use with a single argument to show those # aliases with a definition which contains that argument. # The '\!*' gets replaced by whatever you type after 'wa': # # wa ls EXPANDS TO alias | grep ls # # Recall that 'alias' on its own lists all current aliases, one per # line. ######################################################################## alias wa 'alias | grep \!*' ######################################################################## # I use aliases so frequently that I abbreviate it 'a' ######################################################################## alias a alias