Some Windows cmd equivalents for common Unix commands for my onw reference
| unix | cmd |
powershell |
|
|---|---|---|---|
| echo $variable | echo %variable% | $variable $Env:variable //environment variable |
|
| cp source target | copy source target | ||
| cp -r source target |
xcopy source target /e/h |
||
| find -name '*.txt' |
dir /s *.txt | ||
| grep text |
findstr text | ||
| ls -a | dir /a | ||
| rm file | del file | ||
| rm -rf directory | rmdir /s /q directory | ||
| which command |
where command |