New answers tagged less
If the -r option doesn't work, maybe the -R option will do what you want: -R or --RAW-CONTROL-CHARS Like -r, but only ANSI "color" escape sequences are output in "raw" form. Unlike -r, the screen appearance is maintained correctly in most cases. ANSI "color" escape sequences are sequences of the form: ESC [ ... m ...
I'm afraid you can't. From the man page: Warning: when the -r option is used, less cannot keep track of the actual appearance of the screen (since this depends on how the screen responds to each type of control character). Thus, various display problems may result, such as long lines being split in the wrong place.
I'm not sure how to enable this from the command line but when you're inside of less you can toggle the behavior you want by giving the -i command to less. toggling -i searching for /blah and /BLAH ...
:v/^2014-02-18 15:30:/d in vi deletes all lines except those matching that pattern. Then you can filter more with: :v/UserName:someguy/d Though you could do it in one go with: :v/^2014-02-18 15:30:.*UserName:someguy/d In less, type & and then ^2014-02-18 15:30:.*UserName:someguy
10Gmm1G|mcat > outfile.txt (typed within less) seems to work as long as the input doesn't fit in one screen (in which case all the input ends up in outfile.txt for some reason). 10G brings you to line 10 mm sets the m mark there 1G (same as g in this case) brings you to line 1 |m pipe from the current line to mark m cat > outfile.txt: that's piped ...
You could use view which is the same as vi -r
Top 50 recent answers are included