Peek at the start/end of a (huge) file

Ki Kim's picture

See the beginning of a file.

$ head foo.log

See first 25 lines.

$ head -n 25 foo.log

See the end of the file.

$ tail foo.log

"Follow" a log file that is being updated.

$ tail -f foo.log
Category: 

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
To prevent automated spam submissions leave this field empty.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.