Skip to main content
Bounty Awarded with 25 reputation awarded by CommunityBot
Grammer
Source Link
Thor
  • 17.5k
  • 3
  • 55
  • 71

I see similar behavior as you describe when I try this on /var/log/syslog which is 2.1MB in size and around 22500 lines long. Suspecting that ccze was partly to blame for it, I ran:

time ccze -A /var/log/syslog > foo

Which showed that ccze takes around 55 seconds on my 1.2GHz machine to generate the colorized output. I expect this is what makes less hang, less cannot go to the end of the output before ccze ishas finished generating it, so less seems to hang.

Alternatives to make this work better:

  • Select output with grep, sed etc. and then pipe into ccze.
  • Pre-colorize file and run less on that.

I see similar behavior as you describe when I try this on /var/log/syslog which is 2.1MB in size and around 22500 lines long. Suspecting that ccze was partly to blame for it, I ran:

time ccze -A /var/log/syslog > foo

Which showed that ccze takes around 55 seconds on my 1.2GHz machine to generate the colorized output. I expect this is what makes less hang, less cannot go to the end of the output before ccze is finished generating it, so less seems hang.

Alternatives to make this work better:

  • Select output with grep, sed etc. and then pipe into ccze.
  • Pre-colorize file and run less on that.

I see similar behavior as you describe when I try this on /var/log/syslog which is 2.1MB in size and around 22500 lines long. Suspecting that ccze was partly to blame for it, I ran:

time ccze -A /var/log/syslog > foo

Which showed that ccze takes around 55 seconds on my 1.2GHz machine to generate the colorized output. I expect this is what makes less hang, less cannot go to the end of the output before ccze has finished generating it, so less seems to hang.

Alternatives to make this work better:

  • Select output with grep, sed etc. and then pipe into ccze.
  • Pre-colorize file and run less on that.
Source Link
Thor
  • 17.5k
  • 3
  • 55
  • 71

I see similar behavior as you describe when I try this on /var/log/syslog which is 2.1MB in size and around 22500 lines long. Suspecting that ccze was partly to blame for it, I ran:

time ccze -A /var/log/syslog > foo

Which showed that ccze takes around 55 seconds on my 1.2GHz machine to generate the colorized output. I expect this is what makes less hang, less cannot go to the end of the output before ccze is finished generating it, so less seems hang.

Alternatives to make this work better:

  • Select output with grep, sed etc. and then pipe into ccze.
  • Pre-colorize file and run less on that.