.bash_history-*.tmp
私のホームフォルダには、私も知らないように(2021年4月16日)に作成された空のフォルダが169個あります。ファイルには所有者に対する読み取りおよび書き込み権限のみがあります。これが起こる原因は何であるかよくわかりません。 5年間のLinux旅行(デスクトップとサーバー)の間にこれが起こったことはありません。もっと奇妙なことは、私のデフォルトのシェルがbashではないということですzsh
。誰かが正確に何が起こっているのか(可能であれば)、または他の人に何が起こったのかを理解するのに役立ちます。よろしくお願いします。ここにいる
.-(~)(user@host)
`-->> find . -name '.*.tmp'
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-01407.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-01810.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-02487.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-03675.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08255.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08260.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08283.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08326.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08434.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08450.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08550.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08581.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08649.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08676.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08683.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08697.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08698.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08712.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08717.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08742.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08743.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08819.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08841.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08878.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08884.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08904.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08914.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-08962.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09060.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09116.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09157.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09201.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09212.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09228.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09247.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09248.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09265.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09274.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09283.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09331.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09366.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09397.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09445.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09501.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09507.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09548.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09597.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09632.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09701.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09760.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09904.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-09992.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-10059.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-10158.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-10166.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-10170.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-10320.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-10536.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-10594.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-10631.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-10714.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-10753.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-11127.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-11189.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-11494.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-11514.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-11697.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-11774.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-11827.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-11973.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12002.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12266.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12316.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12331.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12357.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12377.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12393.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12399.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12400.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12405.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12413.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12417.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12435.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12475.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12513.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12563.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12644.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12648.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12656.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12743.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12779.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12801.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12803.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12817.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12868.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-12971.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13005.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13013.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13020.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13033.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13042.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13047.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13065.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13074.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13089.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13090.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13092.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13094.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13097.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13099.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13145.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13162.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13184.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13202.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13203.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13206.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13208.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13218.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13219.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13220.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13250.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13313.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13316.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13320.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13322.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13323.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13341.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13360.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13388.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13489.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13530.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13566.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13575.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13576.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13630.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13640.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13675.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-13717.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14153.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14156.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14167.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14204.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14254.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14256.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14265.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14267.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14331.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14332.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14359.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14368.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14693.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14792.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14922.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14923.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14928.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14931.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14933.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14943.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14947.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14951.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14955.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-14968.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-30961.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-31005.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-31110.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-31142.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-32057.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-32358.tmp
-rw------- 1 user user 0 Apr 16 17:40 .bash_history-32434.tmp
注:誰かが私に似た投稿を見つけました。アーチLinuxフォーラムしかし、それは私の質問に答えません。
ベストアンサー1
ソースコード(Debianで利用可能)はbash
ファイルの関数を使用してapt-get source bash
履歴ファイルを作成します。一時ファイルを作成し、ここに履歴行を書き込み、実際の履歴ファイルをそのファイルに置き換えます。history_do_write
bash-5.0/lib/readline/histfile.c
tempname = (overwrite && exists && S_ISREG (finfo.st_mode)) ? history_tempfile (histname) : 0;
output = tempname ? tempname : histname;
...
if (rv == 0 && histname && tempname)
rv = histfile_restore (tempname, histname);
書き込みが失敗する可能性がある場所がたくさんあります。この場合、一時ファイルのリンクが解放(削除)され、元のファイルは保持されます。
しかし、あなたはコメント配信フォーク爆弾を爆破した。これが一時ファイルの根本原因である可能性が高いです。制御できないフォーク爆弾による極端なメモリとプロセス圧力のため、bash
このリカバリプロセスを完了するために使用できる一時メモリが不足しているため、更新の試行中に衝突が発生する可能性があります。 (確かな証拠ではなく、単に仮説に過ぎないことを参考にしてください。)
ユーザーがフォークバームを実行する可能性のある環境にいる場合は、それほど価値があります。リソース制御の有効化。