Question

I am not sure if this is even possible I search in google but looks like I am not using the correct search string. How can we change the display color of directory strings, files etc.

Example: when we do ls, command can we change the .bash_profile script to show Directories in Red and Files in yellow? further more can we change file colors based on file type?

Était-ce utile?

La solution

Yes you can. Use

export CLICOLOR=true

to turn on the colors in ls and something like

export LSCOLORS=gxfxcxdxbxegedabagacad

to customize the colors per type of file.

Type

man ls

for an explanation of how LSCOLORS work.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top