aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Linux file execution permission
  • What command will output the last five lines of a file ca...
Multiple choice

What command will output the last five lines of a file called test.txt?

  1. tail test.txt

  2. tail -n 5 test.txt

  3. head -n 5 test.txt

  4. less text.txt

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The tail command is used to display the end of a file. The -n option specifies the number of lines to show, so tail -n 5 test.txt outputs the last five lines.

Keep practicing — related questions

  • What will be the output of the program? class Test { public static void main(String [] args) { Test p = new...
  • What will be the output of the program? class MyThread extends Thread { public static void main(String [] a...
  • What will be the output of the program? boolean bool = true; if(bool = false) /* Line 2 */ { System.out.pri...
  • class Test { private Demo d; void start() { d = new Demo(); this.takeDemo(d); /* Line 7 */ } /* Line 8 */ v...
  • Which of the following testing methods is also called 'functional testing' conducted at the software interf...
  • Which of the following interfaces is an alternative method for issuing commands to RMAN and receiving the o...
  • Which command is used to copy the files in order to transfer them from one PC to another?
  • Which of the following types of command is available as individual programs kept as separate files on the h...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy