投稿

macOS インストーラISOイメージを作成する(macOS Big Sur)

hdiutil create -o /tmp/Big\ Sur -size 13G -layout SPUD -fs HFS+J -type SPARSE hdiutil attach /tmp/Big\ Sur.sparseimage -noverify -mountpoint /Volumes/install_build sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build hdiutil detach /Volumes/Install\ macOS\ Big\ Sur/ hdiutil convert /tmp/Big\ Sur.sparseimage -format UDTO -o /tmp/Big\ Sur.iso mv /tmp/Big\ Sur.iso.cdr ~/Desktop/Big\ Sur.iso rm /tmp/Big\ Sur.sparseimage

macOS USBインストーラを作成する(macOS Tahoe)

macOSインストーラーをダウンロード softwareupdate --fetch-full-installer --full-installer-version 26 USBメモリの識別子確認してフォーマット(diskN を確認した識別子に置き換える) diskutil list diskutil eraseDisk JHFS+ InstallVolume GPT /dev/diskN sudo /Applications/Install\ macOS\ Tahoe.app/Contents/Resources/createinstallmedia --volume /Volumes/InstallVolume --nointeraction

YAMAHAルーターで Wake on Lan 送出

telnet で接続 telnet 192.0.2.1 管理者モードに変更する admin lan1ポート側の指定のMACアドレス向きにマジックパケットを送出 wol send lan1 00:00:5E:00:53:AA 補足: 設定内容を表示 show config 補足: 指定のIPアドレスにPING送出 ping 192.0.2.55

指定の名前のフォルダをカレントディレクトリ以下から探す

find . -type d -name "abc"

PowerShell で Shift_JIS のテキストファイルを対象に正規表現 Grep 検索

chcp コマンドでコードページが 932 になっているものとします。 Select-String -Path "*" -Pattern "^あいう$" -Encoding default

エンコードを Shift_JIS 指定してGrep検索

rg --encoding shift-jis --text '^あいう$' https://formulae.brew.sh/formula/ripgrep

unix, linux でテキストファイルの文字コードを変更する

iconv -f UTF-8 -t Shift_JISX0213 utf-8.txt > shiftjis.txt