mvで上書きされたディレクトリを復元する方法は?

mvで上書きされたディレクトリを復元する方法は?

ディレクトリを別のディレクトリに移動する予定です。予想されるコマンドは次のとおりです。

mv evaluateA2P/ action2pose_bk/evaluateA2P/

ところで、太田が出て実行をしましたね。

mv evaluateA2P/ action2pose_bk/ evaluateA2P/

これで、警告やプロンプトなしでの内容がaction2pose_bk/の内容で上書きされますevaluateA2P/。何とかコンテンツを回復できますか?それとも弁護士を雇う方が良いでしょうか?

システムメッセージ

Linux XXXXXXX-workstation3 5.3.0-28-generic #30~18.04.1-Ubuntu SMP Fri Jan 17 06:14:09 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

今起こったことのデモは次のとおりです。

/tmp$ mkdir test1 test2
/tmp$ touch test2/important_file
/tmp$ mv test1 test2 test1
mv: cannot move 'test1' to a subdirectory of itself, 'test1/test1'
/tmp$ ls test2
ls: cannot access 'test2': No such file or directory

ベストアンサー1

mv evaluateA2P/ action2pose_bk/ evaluateA2P/

このコマンドの結果は、action2pose_bkディレクトリをevaluateA2Pディレクトリに移動することです。ジョブを元に戻すには、次のコマンドを実行してもう一度移動してください。

mv action2pose_bk/evaluateA2P .

おすすめ記事