Monitoring a log file in Ubuntu

Which of these commands can you use to monitor a log file named ‘file.txt‘ in your Ubuntu 18.04 system?

Note: Assume that you are remotely connected to a server and don’t have a GUI.

  1. tail -f file.txt
  2. head -f file.txt
  3. tail -n file.txt
  4. head -n file.txt

Related Posts