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:
“We teach boys to be such men as we are. We do not teach them to aspire to be all they can. We do not give them a training as if we believed in their noble nature. We scarce educate their bodies. We do not train the eye and the hand. We exercise their understandings to the apprehension and comparison of some facts, to a skill in numbers, in words; we aim to make accountants, attorneys, engineers; but not to make able, earnest, great- hearted men.”
—Ralph Waldo Emerson (18031882)
“But the best read naturalist who lends an entire and devout attention to truth, will see that there remains much to learn of his relation to the world, and that it is not to be learned by any addition or subtraction or other comparison of known quantities, but is arrived at by untaught sallies of the spirit, by a continual self-recovery, and by entire humility.”
—Ralph Waldo Emerson (18031882)
“Our ancestors were savages. The story of Romulus and Remus being suckled by a wolf is not a meaningless fable. The founders of every state which has risen to eminence have drawn their nourishment and vigor from a similar wild source. It was because the children of the Empire were not suckled by the wolf that they were conquered and displaced by the children of the northern forests who were.”
—Henry David Thoreau (18171862)
“If writers were too wise, perhaps no books would get written at all. It might be better to ask yourself Why? afterwards than before. Anyway, the force from somewhere in Space which commands you to write in the first place, gives you no choice. You take up the pen when you are told, and write what is commanded. There is no agony like bearing an untold story inside you.”
—Zora Neale Hurston (18911960)