• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Search

tail

Display certain lines in a file

March 23, 2023

This will display only lines 40-50 in a file called lines.txt.

$ cat lines.txt | head -n 50 | tail -n 10

$ cat lines.txt | head -n 50 | tail -n 10

For lines 90-100.

$ cat lines.txt | head -n 100 | tail -n 10

$ cat lines.txt | head -n 100 | tail -n 10

and so on.

Filed Under: Linux Tagged With: cat, display, head, lines, tail

Tail A File in Windows Server

November 19, 2019

Linux has tail command. What about Windows? You can use Powershell to tail a file.

Get-Content myLog.log –Wait

Get-Content myLog.log –Wait

Filed Under: Windows Tagged With: file, log, powershell, tail, windows

  • Home
  • About
  • Search

Copyright © 2023