Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As the title implies, when I am browsing text file,I would like to know the current viewed porportion of the whole text file.

I know that with -N option,we could turn on the line numbers,but how could I make less display the line number of the whole text file?


share|improve this question
up vote 5 down vote accepted

If you open a file with less then pressing Ctrl-g will display the current line number, total lines and percentage as well as shown below:

lines 51-100/185 byte 3228/5886 54% (press RETURN)

share|improve this answer
thanks.after revisiting the man page,manage to find it and get the other two equal command ':f' and '='.sorry for this. – Jichao Nov 3 '09 at 13:29

Do you mean like with the -M switch?

share|improve this answer
That's exactly what I want! – Jichao Nov 3 '09 at 13:31

less -M +Gg

for not very big files it's OK, because +G (G command) go till the end of file

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .