Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a debian install that runs an application server.

I ssh into this debian install from a Windows computer using cygwin and with the application server running I use tail -f to monitor the log files.

Errors from the application are printed in red, warning in yellow, and all other output is the console text color.

However, when I run a nearly identical application server in Windows, and use cygwin to print the log from the filesystem, the log is not colored the way it is when ssh'd into debian.

Is this a difference in the tail command installed in debian and in cygwin? How can I emulate this behavior in cygwin?

share|improve this question
    
Which terminal emulator are you using in these 2 cases? Putty, Windows cmd.exe, Windows powershell? – Mark Plotnick Apr 8 at 6:39
    
I'm using the cygwin prompt. – Joker Apr 8 at 18:54

tail is capable to visualize colors if the source is providing the correct escape codes. Eg:

ls --color=always |tail -f

Likely the Windows logs are not providing them. You can check with

$ od -c logfile

$ ls --color=always |od -c 
0000000 033   [   0   m 033   [   0   1   ; 3   2   m   a   .   e   x 
0000020 e 033   [   0   m  \n   A   0   2  _   C   a   m   p   _   d
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.