Home > Software engineering >  Bash: One line-command for less and shift F
Bash: One line-command for less and shift F

Time:11-02

I would like to open a file with less and automatically go in "tail mode" , which I usually achieve by pressing shift F when the file is already opened in "full screen mode" with less.

Is there a single line-command to do this?

CodePudding user response:

Yess, you can pass the F option with the use of !


Quote from less(1):

cmd

Causes the specified cmd to be executed each time a new file is examined. For example, G causes less to initially display each file starting at the end rather than the beginning.


So in your case, use:

less  F seq.txt
  • Related