Skip to main content
Added correct markdown for monospaced code ; Applied syntax highlighting ; Grammatical corrections
Source Link
JW0914
  • 8.3k
  • 7
  • 31
  • 50
While(1) {ps | sort -des cpu | select -f 15 | ft -a; sleep 1; cls}

This is a simple one liner-liner that will also keep the labels at the top.:

While(1) {ps | sort -des cpu | select -f 15 | ft -a; sleep 1; cls}

This works because formatting the table without any parameters just drawls the default table. autosizeautosize is used to automatically adjust the column width so all the data can fit on screen.

 

Here is a breakdownBreakdown of the shortened commands used:

  • select -f is aselect -f: shortcut for -first-first
  • ft is aft: shortcut for Format-TableFormat-Table
  • -a is a-a: shortcut for -autosize-autosize
  • sleepsleep: defaults to using seconds
While(1) {ps | sort -des cpu | select -f 15 | ft -a; sleep 1; cls}

This is a simple one liner that will also keep the labels at the top.

This works because formatting the table without any parameters just drawls the default table. autosize is used to automatically adjust the column width so all the data can fit on screen.

Here is a breakdown of the shortened commands used

  • select -f is a shortcut for -first
  • ft is a shortcut for Format-Table
  • -a is a shortcut for -autosize
  • sleep defaults to using seconds

This is a simple one-liner that will also keep the labels at the top:

While(1) {ps | sort -des cpu | select -f 15 | ft -a; sleep 1; cls}

This works because formatting the table without any parameters just drawls the default table. autosize is used to automatically adjust the column width so all the data can fit on screen.

 

Breakdown of the shortened commands:

  • select -f: shortcut for -first
  • ft: shortcut for Format-Table
  • -a: shortcut for -autosize
  • sleep: defaults to using seconds
Source Link

While(1) {ps | sort -des cpu | select -f 15 | ft -a; sleep 1; cls}

This is a simple one liner that will also keep the labels at the top.

This works because formatting the table without any parameters just drawls the default table. autosize is used to automatically adjust the column width so all the data can fit on screen.

Here is a breakdown of the shortened commands used

  • select -f is a shortcut for -first
  • ft is a shortcut for Format-Table
  • -a is a shortcut for -autosize
  • sleep defaults to using seconds