Skip to content

Reading and Editing

CommandDescriptionExample
catDisplay the full contentcat file.txt
lessRead page by pageless file.txt
headDisplay the first 10 lineshead file.txt
tailDisplay the last 10 linestail file.txt
tail -fFollow changes in real timetail -f log.txt

  • nano file.txt → simple, intuitive editor.
  • vim file.txt → advanced, powerful editor with a steep learning curve.

  • Use less instead of cat for long files.
  • Use tail -f to monitor logs in real time.
  • Start with nano before diving into vim.