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, similar and/or commands:
“From top to bottom of the ladder, greed is aroused without knowing where to find ultimate foothold. Nothing can calm it, since its goal is far beyond all it can attain. Reality seems valueless by comparison with the dreams of fevered imaginations; reality is therefore abandoned.”
—Emile Durkheim (18581917)
“In the middle of the next century, when the literary establishment will reflect the multicultural makeup of this country and not be dominated by assimiliationists with similar tastes, from similar backgrounds, and of similar pretensions, Langston Hughes will be to the twentieth century what Walt Whitman was to the nineteenth.”
—Ishmael Reed (b. 1938)
“They went to him and woke him up, shouting, Master, Master, we are perishing! And he woke up and rebuked the wind and the raging waves; they ceased, and there was a calm. He said to them, Where is your faith? They were afraid and amazed, and said to one another, Who then is this, that he commands even the winds and the water, and they obey him?”
—Bible: New Testament, Luke 8:24-25.