LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-21-2009, 05:15 AM   #1
wagmare
Member
 
Registered: Jan 2009
Posts: 62

Rep: Reputation: 15
how to change the directory color


hi friends,
how to change the directory color in terminal while using the command ls .. ls --color gives blue color ... i try in /etc/DIR_COLOR ani i change DIR 01;36 # directory from 34 = blue but it is not working ...
please help me
 
Old 01-21-2009, 05:38 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,488

Rep: Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956
The /etc/DIR_COLORS file is just for reference to the default system colors. Modification to the list of colors must be done on a per-user basis, as stated by the comments at the beginning of the file itself:
Quote:
# Configuration file for the color ls utility
# This file goes in the /etc directory, and must be world readable.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults.
So you can simply copy /etc/DIR_COLORS to $HOME/.dir_colors and edit your local copy. After that the applied changes should be visible (and for you as a user only). Be sure to exit from the shell where you've applied the changes, that is changes are applied to newly started shell sessions.
 
Old 01-22-2009, 08:07 AM   #3
wagmare
Member
 
Registered: Jan 2009
Posts: 62

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by colucix View Post
The /etc/DIR_COLORS file is just for reference to the default system colors. Modification to the list of colors must be done on a per-user basis, as stated by the comments at the beginning of the file itself:

So you can simply copy /etc/DIR_COLORS to $HOME/.dir_colors and edit your local copy. After that the applied changes should be visible (and for you as a user only). Be sure to exit from the shell where you've applied the changes, that is changes are applied to newly started shell sessions.
i created .dir_color and do cp /etc/DIR_COLOR
and i change in .dir_colors DIR 01;31 # directory to red and its working
thank you
previos is blue

Last edited by wagmare; 01-22-2009 at 08:15 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
change default vsftp anonymous accout directory /var/ftp to other directory? hocheetiong Linux - Newbie 2 01-24-2010 06:33 PM
Change the color hraposo Linux - General 1 08-20-2007 04:57 AM
change color vito_huang Linux - General 1 11-13-2004 01:21 PM
tcsh color (directory and executables) podollb Linux - Software 0 11-03-2004 04:52 AM
ls --color 'color change' ekdya Linux - General 1 10-06-2003 03:47 PM


All times are GMT -5. The time now is 04:10 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration