How to Open ‘less’ Scrolled to the End

less

Is there a way to open less and have it scroll to the end of the file? I'm always doing less app.log and then pressing G to go to the bottom.

I'm hoping there's something like less --end or less -exec 'G'.

Best Answer

less +G app.log

+ will run an initial command when the file is opened

G jumps to the end

When multiple files are in play, ++ applies commands to every file being viewed. Not just the first one. For example, less ++G app1.log app2.log.

Related Question