On Wed, 2007-10-17 at 18:34 -0700, Lutz Maibaum wrote: > On Wednesday 17 October 2007 18:20:57 Bryen wrote: > > On Wed, 2007-10-17 at 17:50 -0700, Lutz Maibaum wrote: > > > These are exactly the two reasons why I prefer a .dir_colors file: > > > it's in your home directory, and even if you reinstall from scratch > > > the setting persists as long as you keep /home. And it is specific to > > > a single user. > > > > Any suggestions on how to make this global? > > If you want a global change, you can delete the content of /etc/DIR_COLORS. > The file itself has to exist, so you could try > > mv /etc/DIR_COLORS /etc/DIR_COLORS.bak > touch /etc/DIR_COLORS > > as root. > > Hope this helps, > > Lutz
Lutz, You and everyone else have been a great help. I weighed everyone's suggestions and decided I wanted to make this function less volatile but more flexible. (Just in case I need to enable colors again.) The /etc/DIR_COLORS suggestion just didn't cut it for me. So I created aliases in a .alias file and saved a copy of it to /root, /etc/skel and any existing user directories. The aliases in the file are as follows: # These aliases give add/remove color functionality to the 'ls' command. # The presence of an empty .dir_colors file in a user's home directory # disables color functionality. # Double aliases created in case user forgets to add 's' to 'color' # Created: 10/17/2007 alias addcolor='rm -f ~/.dir_colors | echo "Colors added. You must restart your session before it takes effect."' alias addcolors='rm -f ~/.dir_colors | echo "Colors added. You must restart your session before it takes effect."' alias removecolor='touch ~/.dir_colors | echo "Colors removed. You must restart your session before it takes effect."' alias removecolors='touch ~/.dir_colors | echo "Colors removed. You must restart your session before it takes effect."' Works like a charm in root, existing users and new users testing. -- ---Bryen--- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
