LoginSignup
7
2

More than 5 years have passed since last update.

macで消えちゃったテキストファイルを復旧する

Posted at

重すぎてmacの調子が、と思ったら大事なファイルが消えてる、、、、
気分転換に散歩。ほぼ諦めモードからの復旧作業。

探す

sudo find . -type f -name "*.txt" | xargs grep "テキストに書いてあった文字"

見つかる

./.DocumentRevisions-V100/PerUID/501/1/com.apple.documentVersions/00145B6D-5A27-4CE5-A4AF-42428EBCA25F.txt:テキストに書いてあった文字
./.DocumentRevisions-V100/PerUID/501/1/com.apple.documentVersions/005C1B1B-78F5-4B89-A6C3-702BA2DF880C.txt:テキストに書いてあった文字
./.DocumentRevisions-V100/PerUID/501/1/com.apple.documentVersions/006CF4B6-2784-4D05-B2AF-7332AF1BE7C3.txt:テキストに書いてあった文字
./.DocumentRevisions-V100/PerUID/501/1/com.apple.documentVersions/00E2F615-39A2-41F2-8E92-ED38755C4ADD.txt:テキストに書いてあった文字

なんだこのフォルダは。。

cd /

見つかる

ls -la
.DocumentRevisions-V100
sudo cd /.DocumentRevisions-V100

おめあてのものをコピーする
一番上が最新。

sudo ls -lt PerUID/501/1/com.apple.documentVersions
sudo cp PerUID/501/1/com.apple.documentVersions/069E2AFB-BBEA-4369-9E09-AE572F0BC0BD.txt ~

残っててくれてありがとう!!!

7
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
2