one Verified current stable Not installed? Filesystem

One / Measure Contents Of File Windows

Measure Contents Of File Windows

One command syntax to measure contents of file windows. Copyable examples, output expectations, and common mistakes.

$
Terminal
"One", "Two", "Three", "Four" | Set-Content -Path "<path\to\file>"; Get-Content "<path\to\file>" | Measure-Object -Character -Line -Word

Command Breakdown

What each part is doing

"One",
Base Command
The executable that performs this operation. Here it runs One before the shell applies any redirect operators.
<path\to\file>
Input Files
The file path or paths supplied to this command.
-Path
Command Option
Tool-specific option used by this command invocation.
-Character
Command Option
Tool-specific option used by this command invocation.
-Line
Command Option
Tool-specific option used by this command invocation.
-Word
Command Option
Tool-specific option used by this command invocation.

Alternative Approaches

Comparable commands in other tools

Alternative filesystem tools for the same job.