For an exercise I'm trying to code the ls
function.
I'm copying the -G
option.
This option will color the name of the file depending of the type.
Until now, I understood that:
Does any one know which are the other colors used and for what kind of file? I'm also looking for the background color.
I showed a script in How to remove dir background in ls -color
output which colorizes the output of dircolors -p
(and would be useful in this question, since it preserves the comments which explain what's being colored).