質問

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?

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top