| キー | 動作 |
|---|---|
| Win + A | クイック設定(ネットワーク/Bluetooth/音量など) |
| Win + B | タスクトレイ |
| Win+ Ctrl + Shift + B | GPU リセット |
| Win + C | Copilot |
| Win + D | デスクトップ |
| Win + E | エクスプローラー |
| Win + F | フィードバックHUB |
| Win + G | キャプチャ/音声/パフォーマンス |
| Win + H | 音声認識サービス |
| Win + I | 設定 |
| Win + J | リコール(プレビュー) |
| Win + K | キャスト |
| Win + L | ロック |
| Win + M | 最小化 |
| Win + Shift + M | 最小化したウィンドウの最大化 |
| Win + N | 通知 |
| Win + O | なし |
| Win + P | 画面(マルチディスプレイ?) |
| Win + Q | Click Todo ? |
| Win + R | ファイル名を指定して実行 |
| Win + S | 最近実行したもの ? |
| Win + T | タスクバー |
| Win + U | アクセシビリティ設定 |
| Win + V | クリップボード |
| Win + W | ニュース ? |
| Win + X | 管理メニュー ? |
| Win + Y | なし |
| Win + Z | なし |
| Win + 1~9 | タスクトレイのアプリを前面に表示 |
| Win + ;(+) | 拡大鏡 |
| Win + : | 絵文字 |
| Win + , | デスクトップを一時的に表示 |
| Win + . | 絵文字 |
| Win + F1 | Windows ヘルプ ? |
| Win + Ctrl + D | 新しい仮想デスクトップ |
| Win + Ctrl + F4 | 現在の仮想デスクトップを閉じる |
| Win + Home | 他のウィンドウを最小化 |
| Win + PrintScreen | デスクトップのスクリーンショット |
| Win + Pause | システム設定 |
Get-ChildItem -Recurse -Filter "*.txt"
または
gci -r *.log
Get-ChildItem -Recurse -File -Filter "hoge"
Get-ChildItem -Recurse -Directory -Filter "hoge"
Get-ChildItem -Recurse | Where-Object LastWriteTime -gt (Get-Date).AddDays(-7)
Get-ChildItem -Recurse -Force -Filter ".DS_Store" | Remove-Item -Force
カレントディレクトリ以下から削除
Add-Type -AssemblyName Microsoft.VisualBasic; Get-ChildItem -Recurse -Force -Filter ".DS_Store" | ForEach-Object { [Microsoft.VisualBasic.FileIO.FileSystem]::DeleteFile($_.FullName,'OnlyErrorDialogs','SendToRecycleBin') }
findstr /i search_text c:\xxx\xxx.txt
findstr /i /s search_text *.log
sls find_text xxx.log
sls -Pattern "^hoge" -Path xxx.log
sls -CaseSensitive "hoge" -Path xxx.log
Get-ChildItem -Recurse -Filter "*.txt" | Select-String "hoge"
sls unmatch_text xxx.log -NotMatch
Get-Content -Path hoge.log -Encoding UTF8 -wait -tail 10
Get-Content -Path hoge.log -Encoding UTF8 | Select-Object -Last 10
New-Item -ItemType Directory -Force -Path c:\tmp
カンマで複数指定可能
New-Item -ItemType Directory -Force -Path c:\tmp,c:\Users\hoge\tmp
Remove-Item -Path <directory> -Recurse -Force
if (Test-Path <directory> -PathType Container) {
Remove-Item -Path <directory> -Recurse -Force
}
Get-Content a,b,c,d | Set-Content e
または
gc a,b,c,d | Set-Content e
(sc は sc.exe(サービスコントローラー)を拾ってしまうので、Get-Alias sc で Set-Content の別名がセットされていなければ Set-Content を使用)
Get-Content a,b,c,d -AsByteStream | Set-Content e -AsByteStream
New-Item -ItemType HardLink -Path link.txt -Target original.txt
New-Item -ItemType SymbolicLink -Path link.txt -Target original.txt
New-Item -ItemType SymbolicLink -Path linkdir -Target originaldir
New-Item -ItemType Junction -Path linkdir -Target originaldir
Get-Command <command>
while ($true) { date; <command>; Start-Sleep 300 }
Measure-Command { <command> | Out-Host }
実行結果をファイルに保存したい場合は
Measure-Command { <command> | Tee-Object output.txt }
makestep 1 -1
refclock PHC /dev/ptp0 poll 3 trust
sudo systemctl restart chronyd
ウィンドウを分割 | 動作 | キー | |—|:-:| |右に新しいペインを追加|Alt + Shift + +| |下に新しいペインを追加|Alt + Shift + -| |ペインを閉じる|Ctrl + Shift + W| |ペイン間でフォーカス移動|Alt + 矢印| |ペインのサイズ変更|Alt + Shift + 矢印|
タブを開くときのショートカットの ctrl + Shift + (1|2|3…) の順序を変更
[設定] を開き、サイドバーの一番下にある「JSONファイルを開く」をクリック。
エディタで JSON ファイルが開くので、profiles - list 配下のタブ項目の順序を入れ替える。
nslookup の代わりに Resolve-DnsName を使用
(例) DNS サーバー 192.168.1.1 を使って www.example.com の IP を確認
nslookup www.example.com 192.168.1.1
Resolve-DnsName www.example.com -Server 192.168.1.1 -Type A
set today=%date:~0,4%%date:~5,2%%date:~8,2%
hoge.exe > hoge_%today%.log
set time2=%time: =0%
set now=%time2:~0,2%%time2:~3,2%%time2:~6,2%
hoge.exe > hoge_%now%.log
Get-Content -Path logfile.log -wait -tail 0 -Encoding UTF8
robocopy d:\hoge\fuga c:\hoge\fuga /E /XO /L
robocopy d:\hoge\fuga c:\hoge\fuga /E /XO /MIR /L
robocopy d:\hoge\fuga c:\hoge\fuga /E /XO /MT:1 /L
robocopy src dest /E /FP /NDL /L
robocopy dest src /E /FP /NDL /L
双方向で比較して Copied が 0 であればほぼ差分なし(サイズ、タイムスタンプが同じで中身が違う場合は検出されない)
または /MIR を付けて確認
robocopy 9.6 src dest /E /FP /NDL /MIR /L
"keybindings":
[
{
"id": "Terminal.CopyToClipboard",
"keys": "ctrl+c"
},
{
"id": "Terminal.PasteFromClipboard",
"keys": "ctrl+shift+v"
},
{
その他の設定 ...
...
}
],
この設定によりクリップボードツールからペーストすると、クリップボードツールから疑似入力された Ctrl + V が効かなくなる。
Ditto の場合はレジストリ設定により、Shift + Insert を送信することでそのままペーストできるようになる。
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Ditto\PasteStrings]
"gvim.exe"="\"{PLUS}gP"
"pwsh.exe"="+{INS}"
"ssh.exe"="+{INS}"
"OpenConsole.exe"="+{INS}"
"conhost.exe"="+{INS}"
"WindowsTerminal.exe"="+{INS}
どのコマンドが実行されているかは、Windows Poershell を 1つだけ起動して(Powershell がいくつも開いていると、タスクマネージャーでどれかわからなくなるため)、タスクマネージャーでそれらしきプロセスを右クリックし、「ファイルの場所を開く」で確認。
(参考) https://github.com/sabrogden/Ditto/wiki/Custom-Key-Strokes
dir x:\backup\2026-01-05\ -Force
attrib -s -h x:\backup\2026-01-05\desktop.ini
del x:\backup\2026-01-05\desktop.ini
-Force: 隠しファイルやシステムファイルを表示。desktop.ini はエクスプローラーで「隠しファイルを表示」に設定しても表示されない。
-s: System 属性をはずす
-h: Hidden 属性をはずす
(バックアップ対象からも desktop.ini をはずしておく)