Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

thanks.

share|improve this question
add comment

3 Answers 3

up vote 1 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
add comment

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
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.