[Nottingham] Bash commands

Roger Light roger.light at nottingham.ac.uk
Thu Feb 5 11:45:43 GMT 2004


Hi,

First of all, thanks to Martin for giving the talk on bash yesterday - I 
certainly learned some new things. Is there any chance the link for the 
talk could make it onto the list for all to see?

I promised that I'd send the solution to one bash problem which seems to 
be quite commonplace. The problem is that your command line doesn't 
overflow to the next line properly and will overwrite what you have 
already typed. This is caused by resizing the bash window without it 
realising.

The solution is very easy, just add the following line to the 
appropriate place - .bashrc or wherever is best for your distribution. 
Personally I have it in /etc/profile (on Gentoo) so that it is default 
for every user.

The line:

shopt -s checkwinsize

Another of my favourite aliases is "lsd", which I define to get a list 
of directories within the current directory. It does only work for the 
current directory, so lsd /etc wouldn't work, but it would be quite easy 
to modify it to accept arguments.

alias lsd='ls -l | grep ^d'

Cheers,

Roger



More information about the Nottingham mailing list