Felix on Nostr: I just lost an entire #script I had written and added to my #git repository not ...
I just lost an entire #script I had written and added to my #git repository not realising that I was in #rebase mode and did a `git rebase --abort`. I didn't appear in `git reflog`, simply lost.
`sudo grep -ab "someurl.project" /dev/mapper/data` gave me the offset and `sudo dd if=/dev/mapper/data bs=1 skip=$((1462413094-2000)) count=5000` gave me the files content.
#linux #dd #grep #forensics
Published at
2024-06-14 13:57:30Event JSON
{
"id": "5087081e127a2f617e9193996f9b7639eba973ae1daf9d2569ade4fc7825973f",
"pubkey": "48c3f741dc662e17a4dd2fa29476eca690cae535e0dd9cf1e0eb6e95d38fd28d",
"created_at": 1718373450,
"kind": 1,
"tags": [
[
"t",
"script"
],
[
"t",
"git"
],
[
"t",
"rebase"
],
[
"t",
"linux"
],
[
"t",
"dd"
],
[
"t",
"grep"
],
[
"t",
"forensics"
],
[
"proxy",
"https://infosec.exchange/users/centaury/statuses/112615322421371242",
"activitypub"
]
],
"content": "I just lost an entire #script I had written and added to my #git repository not realising that I was in #rebase mode and did a `git rebase --abort`. I didn't appear in `git reflog`, simply lost.\n\n`sudo grep -ab \"someurl.project\" /dev/mapper/data` gave me the offset and `sudo dd if=/dev/mapper/data bs=1 skip=$((1462413094-2000)) count=5000` gave me the files content.\n\n#linux #dd #grep #forensics",
"sig": "f153d4c77df3670062752ffb07a137c91df7dc895a48ea2ea864edd1fb283f377150dca24fbfab56241df2cd8c591784150b27d9fc884967e2e768eaa112487b"
}