Ubuntu – How to change the color of particular file

bash

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?

Best Answer

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

Related Question