Less -w or –hilite-unread option temporarily highlights the first “new” line after a forward movement of a full page. The first “new” line is the line immediately following the line previously at the bottom of the screen. Also highlights the target line after a g or p command. The highlight is removed at the next command which causes movement. The entire line is highlighted, unless the -J option is in effect, in which case only the status column is highlighted.
Less -W or –HILITE-UNREAD option is similar to -w option, but temporarily highlights the first new line after any forward movement command larger than one line.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
## create a long file with 200 lines > myfile; i=1; while [ $i -le 200 ]; \ do echo "$i" >> myfile; ((i++)); done ## default less myfile ## in interactive mode type z to forward 1 window ## no lines were highlighted in the next window ## less -w or --hilite-unread option less -w myfile ## in interactive mode type z to forward 1 window ## 1st line is highlighted in the next window ## less -W or --HILITE-UNREAD option less -W myfile ## in interactive mode type d to forward 1/2 window ## 1st line is highlighted in the next window ## in case of -w this would not highlight any line. ## as we have not forwarded one full screen rm myfile |