What is the purpose of the +/- option in the 'less' command?

0142

The less command in Unix-like systems is used for viewing the contents of files one screen at a time. The + and - options are used to control the behavior of less when it starts.

  • + option: This allows you to specify a command to be executed when less starts. For example, less +G filename will open the file and immediately jump to the end.

  • - option: This is used to specify options that modify the behavior of less. For example, -N will display line numbers.

You can combine these options as needed to customize how you view files with less.

0 Comments

no data
Be the first to share your comment!