I know, I can specify custom time format for ls like thisls -lAF --time-style=+ %Y-%b-%d  %H:%M:%S --color=alwaysbut I would like to smuggle in colors inside the time format. For example, I would like to have the year 2014 in red color. How would I do that?I have tried putting the color code \033[0;31m in front of the %Y, but the code does not get interpreted as color but as gibberish.
Include colouring in GNU ls time-style
terminal;ls
Enter the ESC character literally. This is usually done by entering Ctrl+V and then the requested key, in this case Esc.Or in ksh93, zsh or bash, use the $'...' quotes where echo-like escape sequences are expanded:ls -lAF --time-style=$'+ \e[31m%Y\e[m-%b-%d  %H:%M:%S' --color=always