Windows PowerShell - Comparison of Cmdlets With Similar Commands

Comparison of Cmdlets With Similar Commands

The following table contains a selection of the cmdlets that ship with PowerShell, noting similar commands in other well-known command-line interpreters.

PowerShell (Cmdlet) PowerShell (Alias) CMD.EXE / COMMAND.COM Unix shell Description
Get-ChildItem gci, dir, ls dir ls List all files / directories in the (current) directory
Get-Content gc, type, cat type cat Get the content of a file
Get-Command gcm help help, which List available commands
Get-Help help, man help man Help on commands
Clear-Host cls, clear cls clear Clear the screen
Copy-Item cpi, copy, cp copy cp Copy one or several files / a whole directory tree
Move-Item mi, move, mv move mv Move a file / a directory to a new location
Remove-Item ri, del, erase, rmdir, rd, rm del, erase, rmdir, rd rm, rmdir Delete a file / a directory
Rename-Item rni, ren, mv ren, rename mv Rename a file / a directory
Get-Location gl, pwd cd pwd Display the current directory/present working directory.
Pop-Location popd popd popd Change the current directory to the directory most recently pushed onto the stack
Push-Location pushd pushd pushd Push the current directory onto the stack
Set-Location sl, cd, chdir cd, chdir cd Change the current directory
Tee-Object tee n/a tee Pipe input to a file or variable, then pass the input along the pipeline
Write-Output echo, write echo echo Print strings, variables etc. to standard output
Get-Process gps, ps tlist, tasklist ps List all currently running processes
Stop-Process spps, kill kill, taskkill kill Stop a running process
Select-String sls find, findstr grep Print lines matching a pattern
Set-Variable sv, set set env, export, set, setenv Set the value of a variable / create a variable

Read more about this topic:  Windows PowerShell

Famous quotes containing the words comparison of, comparison, similar and/or commands:

    When we reflect on our past sentiments and affections, our thought is a faithful mirror, and copies its objects truly; but the colours which it employs are faint and dull, in comparison of those in which our original perceptions were clothed.
    David Hume (1711–1776)

    It is comparison than makes people miserable.
    Chinese proverb.

    The question that’s probably uppermost in the child’s mind is: Why do my parents want to have a baby? Don’t they love me? And if they love me, why do they need another one? Aren’t I enough? Imagine for a minute yourself in a similar situation. Your husband comes home and says: “Honey I love you so much, I’ve decided to go get another wife so I can have two.” How would you feel?
    Lawrence Balter (20th century)

    I do not speak with any fondness but the language of coolest history, when I say that Boston commands attention as the town which was appointed in the destiny of nations to lead the civilization of North America.
    Ralph Waldo Emerson (1803–1882)