Interview Questions

How will you display the first 20 lines of a file?

Use the command "head" to display the top part of the file. By default, it displays the first 10 lines of the file.

If you need to display more then 10 lines, then execute the following command.

bash# head -20 Test.txt