コマンドプロンプト/コマンドプロンプト、PowerShell、Linuxコマンド対応表
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
#navi(../)
* コマンドプロンプト、PowerShell、Linuxコマンド比較・対応...
コマンドプロンプト(DOS)コマンドに対応するPowerShell, Linu...
良く使用すると思われるコマンドの一覧になります。
#contents
#htmlinsertpcsp(win-top.html,win-sp.html)
* コマンド対応表 [#oe3f5d23]
|''No''|''セクション''|''コマンドプロンプト''|''PowerShel...
|1|ファイル・ディレクトリ関連|dir|Get-ChildItem|ls, dir|
|2||dir /b|Get-ChildItem -Name|ls -1|
|3||dir /ad|Get-ChildItem | Where-Object {$_.Attribu...
|4||dir /od|Get-ChildItem | Sort-Object LastWriteTim...
|5||dir /o-d|Get-ChildItem | Sort-Object LastWriteTi...
|6||type|Get-Content|cat|
|7||copy|Copy-Item|cp|
|8||xcopy&br;robocopy|Copy-Item -Recurse|cp -r|
|9||del&br;erase|Remove-Item|rm|
|10||move|Move-Item|mv|
|11||ren|Rename-Item|mv|
|12||dir /b /s|Get-ChildItem -Recurse -Name|find .|
|13||find /c /v ""|(Get-Content 対象ファイル名 | Mea...
|14||cd&br;chdir|Get-Location|pwd|
|15||mk&br;mkdir|New-Item -ItemType Directory|mkdir|
|16||cd&br;chdir|Set-Location|cd|
|17||rd&br;rmdir|Remove-Item|rmdir|
|18||fc|Compare-Object (Get-Content ファイル名) (Get-Cont...
|19||robocopy|←|rsync|
|20||type null > ファイル名|New-item -ItemType File ファ...
|21||copy ファイル名 +|(Get-Item ファイル名).LastWriteTim...
|22|プロセス|tasklist|Get-Process|ps|
|23||taskkill|Stop-Process|kill|
|24||taskkill /im|Get-Process | Where-Object ($_.Pro...
|25|文字列操作|findstr|Select-String -CaseSensitive|grep|
|26||findstr /i|Select-String|grep -i|
|27||sort|Get-Content ファイル名 | Sort-Object|sort|
|28||-|Get-Content ファイル名 | Sort-Object | G...
|29||-|文字列.Replace("置換前文字列", "置換後文字列")&br;...
|30|日付・時刻|date /t&br;echo %DATE%|Get-Date -Format yy...
|31||time /t&br;echo %TIME%|Get-Date -Format hh:mm:ss|dat...
|32|システム|ver&br;winver&br;systeminfo | findstr /...
|33||systeminfo|Get-WMIObject Win32_Processor | Form...
|34||systeminfo|Get-WMIObject Win32_PhysicalMemory |...
|35||logman|-|sar|
|36||logman|-|vmstat|
|37||logman|-|iostat|
|38||コマンド /?|Get-Help コマンドレット|man|
|39||hostname|←|hostname|
|40||taskmgr|←|top|
|41|環境・シェル関連|exit|Exit-PSSession|exit|
|42||set|Get-ChildItem env:|env|
|43||set|Get-ChildItem env:|printenv|
|44||echo|Write-Host|echo|
|45||cls|Clear-Host|clear|
|46||doskey 別名=コマンド|Set-Alias&br;New-Alias|alias|
|47||-|Get-History|history|
|48||%RANDOM%|Get-Random|$RANDOM|
|49||where|Get-Command|which|
|50||%ERRORLEVEL%|$lastexitcode|$?|
|51||-|$PID|$$|
|52|ユーザ|query user&br;query user /server:ホスト名|←|wh...
|53||whoami|←|who am i|
|54|ネットワーク|ipconfig /a|←|ifconfig -a|
|55||netstat|←|netstat|
|56||arp|←|arp|
|57||ping|←|ping|
|58||tracert|←|traceroute|
|59||nslookup|←|nslookup|
|60|その他|NUL|$NULL|/dev/null|
|61||timeout /t 秒 /nobreak > nul|Start-Sleep|sleep|
#htmlinsertpcsp(win-btm.html,win-sp.html)
終了行:
#navi(../)
* コマンドプロンプト、PowerShell、Linuxコマンド比較・対応...
コマンドプロンプト(DOS)コマンドに対応するPowerShell, Linu...
良く使用すると思われるコマンドの一覧になります。
#contents
#htmlinsertpcsp(win-top.html,win-sp.html)
* コマンド対応表 [#oe3f5d23]
|''No''|''セクション''|''コマンドプロンプト''|''PowerShel...
|1|ファイル・ディレクトリ関連|dir|Get-ChildItem|ls, dir|
|2||dir /b|Get-ChildItem -Name|ls -1|
|3||dir /ad|Get-ChildItem | Where-Object {$_.Attribu...
|4||dir /od|Get-ChildItem | Sort-Object LastWriteTim...
|5||dir /o-d|Get-ChildItem | Sort-Object LastWriteTi...
|6||type|Get-Content|cat|
|7||copy|Copy-Item|cp|
|8||xcopy&br;robocopy|Copy-Item -Recurse|cp -r|
|9||del&br;erase|Remove-Item|rm|
|10||move|Move-Item|mv|
|11||ren|Rename-Item|mv|
|12||dir /b /s|Get-ChildItem -Recurse -Name|find .|
|13||find /c /v ""|(Get-Content 対象ファイル名 | Mea...
|14||cd&br;chdir|Get-Location|pwd|
|15||mk&br;mkdir|New-Item -ItemType Directory|mkdir|
|16||cd&br;chdir|Set-Location|cd|
|17||rd&br;rmdir|Remove-Item|rmdir|
|18||fc|Compare-Object (Get-Content ファイル名) (Get-Cont...
|19||robocopy|←|rsync|
|20||type null > ファイル名|New-item -ItemType File ファ...
|21||copy ファイル名 +|(Get-Item ファイル名).LastWriteTim...
|22|プロセス|tasklist|Get-Process|ps|
|23||taskkill|Stop-Process|kill|
|24||taskkill /im|Get-Process | Where-Object ($_.Pro...
|25|文字列操作|findstr|Select-String -CaseSensitive|grep|
|26||findstr /i|Select-String|grep -i|
|27||sort|Get-Content ファイル名 | Sort-Object|sort|
|28||-|Get-Content ファイル名 | Sort-Object | G...
|29||-|文字列.Replace("置換前文字列", "置換後文字列")&br;...
|30|日付・時刻|date /t&br;echo %DATE%|Get-Date -Format yy...
|31||time /t&br;echo %TIME%|Get-Date -Format hh:mm:ss|dat...
|32|システム|ver&br;winver&br;systeminfo | findstr /...
|33||systeminfo|Get-WMIObject Win32_Processor | Form...
|34||systeminfo|Get-WMIObject Win32_PhysicalMemory |...
|35||logman|-|sar|
|36||logman|-|vmstat|
|37||logman|-|iostat|
|38||コマンド /?|Get-Help コマンドレット|man|
|39||hostname|←|hostname|
|40||taskmgr|←|top|
|41|環境・シェル関連|exit|Exit-PSSession|exit|
|42||set|Get-ChildItem env:|env|
|43||set|Get-ChildItem env:|printenv|
|44||echo|Write-Host|echo|
|45||cls|Clear-Host|clear|
|46||doskey 別名=コマンド|Set-Alias&br;New-Alias|alias|
|47||-|Get-History|history|
|48||%RANDOM%|Get-Random|$RANDOM|
|49||where|Get-Command|which|
|50||%ERRORLEVEL%|$lastexitcode|$?|
|51||-|$PID|$$|
|52|ユーザ|query user&br;query user /server:ホスト名|←|wh...
|53||whoami|←|who am i|
|54|ネットワーク|ipconfig /a|←|ifconfig -a|
|55||netstat|←|netstat|
|56||arp|←|arp|
|57||ping|←|ping|
|58||tracert|←|traceroute|
|59||nslookup|←|nslookup|
|60|その他|NUL|$NULL|/dev/null|
|61||timeout /t 秒 /nobreak > nul|Start-Sleep|sleep|
#htmlinsertpcsp(win-btm.html,win-sp.html)
ページ名: