What is the purpose of the 'less' command?

0126

The less command is used in Unix-like operating systems to view the contents of a file one screen at a time. It allows users to scroll through the file, search for text, and navigate easily without loading the entire file into memory. This is particularly useful for viewing large files. You can open a file with less by using the command:

less filename.txt

While viewing a file in less, you can use the following keys for navigation:

  • Space or f: Move forward one screen
  • b: Move backward one screen
  • Arrow keys: Scroll line by line
  • /: Search for a string
  • q: Quit the viewer

0 Comments

no data
Be the first to share your comment!