Some more default aliases for bash

Bug #9349 reported by Leo
8
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Fix Released
Wishlist
Matthias Klose

Bug Description

Just some aliases that would make life a little easier if they were default for
those times when one must delve into the horrid world of a terminal or console
*grin*

Make cding up a directory easier:
alias ..='cd ..'
alias cd..='cd ..'

Make df produce some human readable(Read: userfriendly) units:
alias df='df -h'

Guard against accidental loss of data by removing the wrong thing, copying over
somehting when you didn't really mean it, and likewise for moving.
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

Revision history for this message
Matt Zimmerman (mdz) wrote :

I'm strongly against the rm/cp/mv aliases as a default, and I think the DOS-ish
ones are probably not appropriaate either (they encourage bad habits).

It seems unnecessary to make df prettier when we offer a nice, graphical disk
usage display in the System Monitor application.

My general feeling on such changes is that users who are accustomed to the
command line should get what they expect from a Unix-like system, and users who
are not familiar with the command line should not need to venture into it :-)

Revision history for this message
Leo (pizbit) wrote :

Good points, I mainly came across the desire for them when I was configuring my
Ubuntu install to my liking by using config files or parts of from my old Debian
install. Something much easier and quicker done at the command line than digging
around with almost literally millions of nautilus windows, especially when I
wanted to retain permissions and handle hidden files. (Although I did just copy
the aliases from the old .bashrc to the new:))
I like df because it shows how much I have free which IMHO is more important
than the amount used, the gnome-system-monitor is most sorely lacking in this
respect.

Revision history for this message
Matthias Klose (doko) wrote :

I don't mind for new aliases, but for aliases redefining commands.
Maybe just add a chunk like

# Define your own aliases here ...
if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

so we don't get "swamped" with requests for new aliases.

Revision history for this message
Wouter Stomp (wouterstomp-deactivatedaccount) wrote :

I think most of the commented out aliases in .bashrc are very useful:

cd.. -> cd ..
First thing I did after finding out about the aliases. Most linux commands are
not that hard to learn, but getting rid of the habit of typing cd.. is almost
impossible. It is also a big cause of confusion when new users are trying to
follow someone other's instructions and think they are doing it right but keep
getting an error message.

ll -> ls -l
l -> ls
Both not really necessairy, but I really missed them when I switched from
Mandrake and didn't know how to use aliases yet.

Also, no matter how much some people will dislike it, newbie's will really
appreciate rm -> rm -i. Just for safety. Not needed for cp or mv, they are not
by far as dangerous as rm. I already know some people who shortly after starting
using the commandline did rm * in the wrong directory, and if you loose some
important documents, this will not be very encouraging to keep using linux.

Revision history for this message
Matthias Klose (doko) wrote :

the chunk about sourcing ~/.bash_aliases is added, not going to add DOS aliases.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.