Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to change the color of particular file type:

  • for .c files red
  • for .out files green
  • for .sh files orange

Like this, how to make these colors as default color for the corresponding file type?

share|improve this question
    
Did you try my answer? –  saji89 Dec 29 '12 at 11:38
    
Thanks for the answer ... But I got another method –  Omkant Dec 29 '12 at 11:54
    
Cool. :) Please post that as an answer and mark this question solved. –  saji89 Dec 29 '12 at 11:59
    
Posted my answer –  Omkant Dec 29 '12 at 12:20
    
Now please mark as the answer –  saji89 Dec 29 '12 at 12:26

3 Answers 3

up vote 2 down vote accepted

I needed the color difference whenever try ls -l or ls commmand.

So I just used $LS_COLOR variable and modified it like this.

LS_COLORS='*.c=01;32:*.out=31:*.sh=01;35:'

for more this source about bash

share|improve this answer

Use the dircolors command. For example if you want to have the Solarised theme, download the required dircolors database file from this link To use it just do the following:

eval `dircolors /path/to/dircolorsdb`

For more instructions refer the readme of the previous link.

Some other useful links:

share|improve this answer

By writing condition for gtk~.css or some action for Nautilus.
Or maybe just using custom iconset?

Need to say, such terminal command like ls is using folders and files coloring, and perhaps this feature have the base to be extended.

Look this answer: Can we have Mac like 'labels' on GNOME?

share|improve this answer
1  
I wanted only a way how to do it please steps or if already there is an answer plz provide some link, I am not able to find it –  Omkant Dec 3 '12 at 6:37
    

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.