It is possible to use colors on the Unix command-line interface.

learn more… | top users | synonyms (1)

0
votes
0answers
21 views

Is there a way to “flag” some directories so that that get a given color when I do ls [duplicate]

My use case is that a few directories on my system are dist'ed on github. Typically the dotfiles directory, some packages I am writing etc... Because their number grows I'd like to flag them when I ...
1
vote
1answer
38 views

Different color schemes in URxvt?

I would like to be able to switch between a light and dark color scheme in an existing rxvt-unicode terminal window, in the same vein as switching profiles in gnome-terminal. Would the best way to do ...
2
votes
2answers
65 views

How can I change the color of this blue text on my command line?

I know this question has been asked multiple times but I didn't find the answer on those other questions. Here an Image to illustrate my point: Can you read the blue line without squinting? No? Me ...
3
votes
1answer
39 views

How to print a pattern of text in color?

RED='\033[0;31m' NC='\033[0m' # No Color var='I /love Stack Over/flow' I am trying to print a portion of text using regex in color but it's not working. echo $var | sed "s=\(.*/\)\(.*\)=\${RED}\2\$...
0
votes
0answers
32 views

How to force vim to interpret ANSI color escape sequences [duplicate]

If I have a file that has color control characters for the data, such as this example: ^[[96mJul 16 22:12:25 192.168.100.101 This is the data^[[39m And I want to view it with Vim, is there a way to ...
0
votes
1answer
21 views

Colorized tail: How to set default color

I have a function setup to provide color to the tail command using ANSI escape sequences with sed. function colortail { tail -f -n30 $1 | sed -e 's/\(.*MINOR.*\)/\o033[93m\1\o033[39m/' -e 's/.*MAJOR....
1
vote
1answer
44 views

Is it possible to send color code escape sequences before login?

I'm trying to colorize the console and I'm having success with the following in root's .bash_profile: echo -en "\e]P7000000" echo -en "\e]P0F0F0F0" clear The problem is that this is obviously only ...
1
vote
1answer
36 views

Colour-coordinate symlinks/softlinks based on where they refer to

Is there any way to colour coordinate symlinks/softlinks based on where they're linked, or maybe by who they 'belong' to (similarly to colouring the output of ls for example)? To give you an example ...
0
votes
1answer
37 views

how to change colors of my ps1 root terminal permanently [duplicate]

I want to change the colors of root@MyComputer:~#and when i type the ls command show me the result as colors! I write a simple BB code to display what i want: [color=red]root@MyComputer:[/color][...
2
votes
2answers
56 views

Bash colors defined in .bashrc behaving oddly. I can't figure it out

When I type ls -l my command color defined in .bashrc is only used on the first item up until the directory or file name which has its own color defined. The proceeding lines seem to get a default ...
1
vote
0answers
56 views

How to fix Eclipse and Caja color in Linux Mint Mate?

I started using Eclipse IDE with Linux Mint. I have darkened Ambiance theme and Eclipse looks extremely ugly and painful to eyes. And it seems I cannot change that white color of file browser ...
0
votes
2answers
23 views

Changing the color of only one directory in ls

Is there a way to change the color of only one of the listed directories in the ls command? I have researched the LS_COLORS variable, but this doesn't solve the issue because you cannot list specific ...
0
votes
1answer
20 views

Highlight Vim escape characters e.g. \n

I'm using the Jellybeans vim colorscheme but it doesn't highlight any escape characters. For example if I'm using C++ and have the following... std::string word = "hello\n"; ... the whole string ...
2
votes
2answers
116 views

sed - find correct color sequence for ANSI extended 256 colors

I am currently using the following command to use the standard ANSI colors with the tail command: tail -f syslogfile | sed -e 's/\(.*MAJOR.*\)/\o033[93m\1\o033[39m/' This is bright yellow however I ...
1
vote
1answer
28 views

Lynx colors not applied

I have a lynx configuration file in ~/.lynx.cfg. To make lynx use it, I have in my environment $LYNX_CFG pointing at that file. Content: # Default COLOR:0:black:white # Hyperlinks COLOR:1:black:...
1
vote
1answer
65 views

Vim color scheme not being applied

I am installing this theme using these instructions. $ vim --version VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr 08 2016 11:38:28) Included patches: 1-1689 Here is my ~/.vim/colors: xxx@xxx:~/...
0
votes
1answer
47 views

How to change the color of boot logs in Debian?

OS: Debian Jessie (8) How can I change the color of all the logs and text during the initial boot (and also the final shutdown) to black? (including the login user/password prompt) !? My goal is to ...
3
votes
4answers
148 views

Where should I save color codes for the PS1 command line / terminal? [closed]

This question is about best practices. I know logging in over secure shell or switching users su, and su -l have different effects. Also, in the event you make a typo in the configuration, you still ...
2
votes
0answers
39 views

Portable color codes with printf? [duplicate]

There is a color codes script on GitHub suitable for sourcing, which I am modifying for my own purposes. Background I have an odd mix of environments to work in, from a Mac OS terminal, to various ...
14
votes
2answers
841 views

Colored output?

When I execute a command from a terminal that prints coloured output (such as ls or gcc), the coloured output is printed. From my understanding, the process is actually outputting ANSI escape codes, ...
0
votes
1answer
28 views

how to color specific strings in standard output and standard error [duplicate]

How do you color specific strings in standard output and standard error? For example: gpg --verify Outputs either a good signature or a bad signature string. How can I color the good one, green; ...
2
votes
1answer
33 views

In the SGR number 38 and 48, where do the 2 and 5 numbers come from?

In multi-color-compatible terminals, one can set a color from a 256-color palette by using ESC[38;5;Nm, and any RGB color using ESC[38;2;R;G;Bm. I've been wondering though, where do the "2" and "5" ...
1
vote
3answers
45 views

Unable to use a escape sequences in a variable in a sed command

I'm using sed to highlight a column in the output of a ps command, and it works fine if I hard code the color code. However, the color needs to be dynamic, so I tried moving it to a variable, and ...
2
votes
1answer
55 views

Highlight nth column of ps output

I'm trying to find the best way to highlight a specific column of some output. Specifically, I'm trying to highlight the 9th column (which is %cpu of the command: ps -eo pid,ppid,time,user,tty,%cpu,%...
-1
votes
1answer
54 views

tmux not printing ANSI colors in status bar

I'm using Mac OSX Yosemite, and I use istats to get CPU temperatures: I wanted to put my CPU temperature in my tmux status bar, so I made my tmux config the following: As you can see, when I ran :...
0
votes
1answer
13 views

Display RGB database foreground/background combinations

I'm trying to adjust color in X. I seem to recall that there are a couple of utilities available to experiment with foreground/background combination while displaying all the colors. Anybody know ...
1
vote
2answers
52 views

Diff patch output saved to a file. How to see it syntax-colored?

I have a folder with subfolders that contains text files. Every now and then I run a script that makes a copy of that folder tree and then creates a new one with fresh info. After that, having the ...
1
vote
0answers
30 views

Paging with follow less +F and colorize with awk

I would like to paginate a file with follow, i.e. $less +F and also colorize the output on the screen. I want to use less because I can leave the follow mode, browse the file and then re-enter the ...
0
votes
0answers
19 views

grep, assigning colour per string match? [duplicate]

Is it possible to set the colour of a Grep result per search. I have searched and cannot find a definitive answer Am scanning through some large Error Logs and ideally looking for the output of ...
2
votes
1answer
57 views

Different vim colors and styles in Tmux and Gnome

I am using tmux, and recently found out that the same vim colorshemes inside and outside of tmux have different colors Left is tmux in gnome-terminal, right is plain gnome-terminal, gnome-terminal ...
1
vote
1answer
65 views

Terminal color usage does not stay

I was wondering if any of you knew why doesn't my terminal keep displaying stuff colored, after I use the command ls -l -a --color=always I would like it to stay colored, so when the next time I type ...
1
vote
2answers
35 views

How to color some strings in a file

I prepare a file Hello.txt as follows. 1253125213 213532135 23513125215 Then, I want to color each line blue except "2", and color the "2" red. At first, I wrote BLUE='\033[0;34m' RED='\033[0;31m'...
0
votes
0answers
18 views

Possibility to write some words in different color in log file [duplicate]

Is there a possibility to colorize words in a log file? I want to have the word ERROR in my logfile always in red, to see it more easily. I watch it with the tail function: tail -f -n 500 catalina....
1
vote
0answers
27 views

Do light color codes work across all distros and terminals? [duplicate]

I use \033[1;34m for light blue. I am using Debian and Putty and it works for me. However, I've heard that it may not work for all users (using different distros and terminals). Is that true? Do they ...
9
votes
3answers
669 views

Piping a command through a color filter

Does something like this exist in Unix? $ echo "this should show in red" | red $ echo "this should show in green" | green $ echo "this should show in blue" | blue Here I don't mean for literal ...
15
votes
2answers
569 views

How do I use grep while keeping the original text color? [duplicate]

For example, I have a output: Hello, this is the output. (let's say that for example hello is colored red, and the is colored green, and output is colored purple). Now, let's say that this is the ...
0
votes
2answers
55 views

How do I make the terminal background bright white?

I am using: setterm --foreground blue --background white --blink on The result is that the text is blue on bright white. However, the background around the text is grey. How can I make the entire ...
0
votes
2answers
44 views

How do I create a dark blue text on a bright white background in MOTD in Debian?

This is what I currently have. It displays black on bright white. However, I want to have blue (0;34m) on bright white. ^[[0;7;34;37;5mWelcome!^[[0m I used this website as a reference, but I did ...
2
votes
1answer
28 views

make ls gray out files that end with tilde (`~`) using `LS_COLOR`

Problem: I am trying to modify LS_COLORS to gray out all files ending with the tilde character. Question: Can anybody spot my mistake? Here is what I did: # write dircolors file: dircolors -p > ...
1
vote
1answer
54 views

set color of conky

I want to set the color of a line to a specific shade of yellow (but not just yellow). I set it like this: ${font LCDMono:bold:size=20}${color yellow}Uptime:$color $uptime Where all the line has ...
0
votes
0answers
17 views

colours specified in terminal emulator? [duplicate]

In terminal editors one can specify a set of colors - a theme - which should be used. In konsole and x-terminal-editor one can set up 16 colors, they seem not to be named, rather only numbered. ...
3
votes
1answer
70 views

Filtering the colored output of grep

I'm on OSX, but I suspect this doesn't make a big difference for this question. In my .bash_profile, I aliased grep to get color outputs by default: alias grep='grep --color=always' I commonly run ...
2
votes
1answer
24 views

Change color when changing directory

I have two folders called Documents and Downloads. In zsh, when I type cdSpaceDoTabc the color of Documents change from white to (hard to read) gray. How can I turn off this color change or control ...
1
vote
1answer
165 views

Why xfce4 terminal colors are so ugly? [closed]

Hello I have a big problem, I'm trying to install some nice color themes on fish and vim but it looks like that my xfce4-terminal has some ill looking internal colors. I installed gnome-terminal to ...
0
votes
0answers
48 views

Vim not loading color scheme file at all

I have exactly same two CentOS 6 boxes. Trying to install vim and enable color scheme file. Same thing, same vim versions used but the color scheme works in one machine and not in other. Here are ...
3
votes
1answer
132 views

Does “color” in TERM always mean I can use colors?

Should the following always indicate that I can use escape sequences and tput to colorize things? if [[ $TERM == *"color"* ]]; then true else false fi
2
votes
1answer
59 views

How to substitute one color code for another in terminal?

Can I make bash automatically substitute one color code for another? For example, whenever a program outputs text wrapped in color code for bold foreground, I would like bash to actually use code for ...
0
votes
1answer
42 views

xterm highlighting always white, not reverse

I'm running Debian on my desktop, laptop, and netbook. On my desktop and laptop, I am using Gnome desktop environment; whereas my netbook is using i3wm (installed after a text-only install initially). ...
1
vote
0answers
81 views

Terminal colors changing when opening a new tab

I'm running Ubuntu 14.04 (x64 desktop edition) and I have an issue in my terminal (bash) where my colors seem to get "saturated" and my line cursor changes to black when opening a new tab, the first ...
4
votes
3answers
1k views

tput setaf color table? How to determine color codes?

I am in the process of colorizing my terminal’s PS1. I am setting color variables using tput; for example, here’s purple: PURPLE=$(tput setaf 125) Question: How do I find the color codes (e.g. ...