[Herts] Top Tips
Mr. Spock
spock at canopus22.demon.co.uk
Tue Feb 10 23:28:25 GMT 2004
Hello,
At last week's meeting, while trying to get X working on
Nicolas' laptop (hope you sorted it!), I mentioned a little
trick to make the ls command list directories and different
filetypes in colour:
alias ls='ls --color=auto'
This sets up an alias of the ls command to always use colour.
To make it happen every time you boot up, add it into your
~/.bashrc file (in your home directory).
You can of course use alias to change command names and make
life easier. If you're used to DOS, then try:
alias dir='ls --color=auto'
Other things I use in my .bashrc file are:
alias ds='du -m --max-depth=1'
alias ds2='du -m --max-depth=2'
...since ds is very fast to type, and has less output than
the plain du (disk usage) command. This will give a list of
the sizes (-m = in Megabytes) of each directory, useful for
finding which directories are hiding the most data. The ds2
command also includes one level of subdirectories, and so on.
So does anyone else have any Top Tips for shell comfort?
--
Malcolm Smith
http://www.canopus22.demon.co.uk/
More information about the Herts
mailing list