Pergunta

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?

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top