0

I love using less to browse files. I often like to move through multiple files.

In the man file it says that one can move N files forward:

:n     Examine the next file (from the list of files given in the command line).  If a number N
       is specified, the N-th next file is examined.

How do I specify this number N to move to the N-th next file? I've tried everything but couldn't figure it out.

1 Answers1

0

As described in these answers on the StackExchange network:

The number must be entered before the command; to skip two files, press 3:n followed by Enter. https://unix.stackexchange.com/a/676818/377222

Another useful answer https://superuser.com/a/1254274/1056672

Note: you actually have to type the : for these commands (even though there is a colon visible already).

:n jump to next file
:p jump to previous file
:x jump to first file

3:n jump 3 files ahead
3:p jump 3 files back
3:x jump to 3rd file

:f print current file name/info (helpful if you forget where you are)