Match .dot files with the wildcard character * in Bash

http://codesnippets.joyent.com/posts/show/2123
# See:
# - http://wooledge.org:8000/glob
# - http://bash-hackers.org/wiki/doku.php/syntax/expansion/globs

help shopt

shopt dotglob

man bash 2>/dev/null | less -p dotglob     # navigate by pressing n or N


# cf. LSCOLORS Generator, http://geoff.greer.fm/lscolors/
# man ls
export CLICOLOR_FORCE=1
#export CLICOLOR=1
#export LSCOLORS=ExGxFxDxCxHxHxCbCeEbEb
#export LSCOLORS=GxFxCxDxBxegedabagacad      
#export LSCOLORS=gxfxcxdxbxegedabagacad     # cyan directories
export LSCOLORS="exfxcxdxbxegedabagacad"    # blue directories


ls -1aFG /
ls -1aFG ~
ls -1aFG /Users

ls -1dFG ~/* | nl | less -r

shopt -s dotglob

ls -1dFG ~/* | nl | less -r

shopt -u dotglob


# delete all files & folders in tmp directories
#shopt -s dotglob
#sudo rm -PRi /tmp/* /private/var/tmp/*
#sudo rm -PRfv /tmp/* /private/var/tmp/*
#shopt -u dotglob