When I view a file in Linux with the 'less' command, I often only get a ":" prompt in the bottom left corner. There's no clue about how long the file will be, or at which location I am currently. When reading manpages with 'man', there's a file title and line number in that corner. And once I hit the end of the file, there's even a percentage shown. I've learned about 'less -m' but it's not that powerful. So what does 'man' differently from 'less'? They appear to be the same viewing programme, except for that file information difference.
(Using Ubuntu 10.4 LTS)
Best Answer
reveals that it just callspager
.reveals that
pager
is actuallyless
. And indeedso less has some presets which are invoked when called by the namepager
.Actually strace also reveals these environment variables:
So that's it!