docker コマンド

コンテナのファイルをコピーする docker cp %Process ID%:/hoge/fuga.txt .

Linux初期設定

フォルダ指定でssh鍵作成 ssh-keygen -t rsa -b 4096 -f ./id_rsa フォルダ権限変更 $ mkdir .ssh $ chmod 700 .ssh $ mv id_rsa.pub .ssh/authorized_keys $ chmod 600 .ssh/authorized_keys rootのssh禁止 # vi /etc/ssh/sshd_config #rootログインを禁止…

Linux よく使う、忘れるコマンド

検索結果を削除 find . -name '*.log' | xargs rm

PowerShell テキストファイル操作

ファイルの空行を削除して標準出力 $file = Get-Content hoge.txt $file | Out-String -Stream | ?{$_ -ne ""} 可変リストに行を追加 using namespace System.Collections.Generic $myList = [List[String]]@() myList.Add("hoge") foreachでループ $newfile…