Filter a directory listing by characters

In Bash, you can get a list of files filtered by a range or choice of characters in the filename by using character expansion. For example, to get a listing of just log files in /var/log ending in .1, .2, .3 and .4, use this command:

$cd /var/log
$ls -l *.[1-4]

Or to just see the files ending in .1 and .4, use:

$ls -l *.{1,4}