| Bash | PowerShell | Bash Example | PowerShell Example |
|---|---|---|---|
| find | Get-ChildItem | find . -type f -name "matchme" | Get-ChildItem -Filter "matchme" -Recurse -File |
| ls | Get-ChildItem | ls -R dir/ | Get-ChildItem '.\dir' -Recurse |
| which | Get-Command | which python | Get-Command python |
| env | Get-ChildItem env: | env | Get-ChildItem env: |
| echo | echo | echo $ENV{'PATH'} | echo $Env:path |
| grep | Select-String | grep 'foobar' file.txt | Select-String -Path '.\file.txt'-Pattern 'foobar' |
| useradd | |||
| cp | Copy-Item | cp -R src/ dst/ | Copy-Item -Path '.\src' -Destination '.\dst' -Recurse |
| cd | Set-Location | cd dir | Set-Location -Path '.\dir' |
| pwd | Get-Locatin | ||
| rm | Remove-Item | rm -rf dir | Remove-Item -Recurse -Force -LiteralPath '.\dir' |
| alias | Get-Alias | alias ls | Get-Alias -Definition Get-ChildItem |
| cat | Get-Content | cat file.txt | Get-Content file.txt |
| clear | cls, clear | ||
| touch | New-Item | touch file.txt | New-Item file.txt |
| tail | Get-Content | tail -n10 file.txt | Get-Content -Tail 10 .\file.txt |
Last active
May 6, 2025 06:36
-
-
Save selftaught/8c8b3392099f180e6c4e96d2481d559f to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment