Activity: Practice using less and it's different options

Title: Practice using less and itโ€™s different options

Time: 5-10 minutes

Purpose: The less command is a quite a powerful tool for viewing files but apart from scrolling up and down it can do much more with the various commands to help you quickly navigate a file while you analyse its contents.

Introduction:
In our demo we had a play with less to scroll up and down a file. But often you need a bit more than just scrolling up and down when youโ€™re analysing a file. How about searching for a string in a file or bookmarking a location where you found an error so you can go back to that position in a file quickly? These are things that you can do with the less command as well.

Activity:

  1. Search for a specific string in a log file using less.
  2. ( Extra ninja points :ninja_black: ) Bookmark the position in the log file where you found the text with the m command and use the ' to go back to that position.

Question based on the above Activity 1. the request is to search a specific string in a log file using the less command, my question is where is the log file located to conduct the search on?