I need to view large logs files using a bash shell. I was using less to open the files, but since the lines are too lengthy there is some kind of line/word wrapping going on.
Since the files are Log4J logs, and there is a pattern in the beginning of each line, having lines wrapped makes it difficult to analyze the output, so I started using less -S which chops long lines.
But now I need to use tail -f, and it also line wraps the output. Is it possible to disable line wrap in a bash shell for all the commands?
Note: there is an answer to a different question that mentions the escape sequence echo -ne '\e[?7l', but it seems to not work on bash.
screen, there is a "wrap" command. Inxterm, there is a-awoption to prevent automatic line wraps. Likely there are some X resources for other terminal emulators. What emulator are you using? – Arcege Sep 12 '11 at 20:04gnome-terminal. – nunaxe Sep 17 '11 at 8:53+awforxterm:) But, this solves the issue for output (e.g., onls -lwith a bunch on long Windows-ish names from TPB, it works fine), for input, when entering a command, you probably still want wrap (or, at least you don't want it the way it is now on+aw: try write beyond the "column border" and then backtrack for a huge GFX bug). – Emanuel Berg Nov 9 '12 at 23:37urxvtnorrxvtcan disable line wraps. – Emanuel Berg Nov 9 '12 at 23:50