# The Start and End of a File: -TotalCount, -Tail and -Wait

Get-Content -TotalCount shows only a file's first lines and -Tail only its last, and -Wait keeps a file open on screen so every line added to it appears as it's written, until Ctrl+C stops it.

![Cheat sheet for the lesson The Start and End of a File: -TotalCount, -Tail and -Wait: Get-Content -TotalCount shows only a file's first lines and -Tail only its last, and -Wait keeps a file open on screen so every line added to it appears as it's written, until Ctrl+C stops it.](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/803832109413453e8aac73c02bded366.webp)

- Category: PowerShell
- Level: Apprentice
- Tags: get-content, log-file, operating-system, powershell
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/powershell-head-and-tail-cheat-sheet
