Restoring Last saved Text File
I was just reading some text file and some keys were pressed by me on keyboard and all text was gone from that text file and by mistake I closed that file by "closed with saving" option. This text file is very important for me. I have checked it as hidden file in that folder but It is not showing. I have also used command sudo strings /dev/mem but it is showing some text which I can't understand and I also used sudo strings /dev/mem | grep -r some text of file but It got paused and not showing anything.
So, I would like to know, Is there any way to go to last saved state of that text file. Please help.
data-recovery text-editor
add a comment |
I was just reading some text file and some keys were pressed by me on keyboard and all text was gone from that text file and by mistake I closed that file by "closed with saving" option. This text file is very important for me. I have checked it as hidden file in that folder but It is not showing. I have also used command sudo strings /dev/mem but it is showing some text which I can't understand and I also used sudo strings /dev/mem | grep -r some text of file but It got paused and not showing anything.
So, I would like to know, Is there any way to go to last saved state of that text file. Please help.
data-recovery text-editor
1
this answer on a similar question might help: askubuntu.com/a/3912/631600
– RoVo
Jan 16 at 12:03
@RoVo Thanks for the response. I have used extundelete but after running the command , it is showing "Bad magic number in super-block when trying to open filesystem /dev/sda4 " . I am also new to ubuntu. Can you please help ?
– ankit
Jan 16 at 12:34
the answer i linked isgrep -a -B 25 -A 100 'containing string' /dev/sda1 > result.txt
– RoVo
Jan 16 at 12:35
@RoVo , I have used it but it is showing no such file or directory although path is correct. Please check where I have written wrong in the command : grep -a -B 25 -A 100 'gateoverflow.in' /home/ankit/Desktop/GOVol3Practice.txt > result.txt ....My file has name GOVol3Practice and it is on Desktop.
– ankit
Jan 16 at 12:53
Replace/home/ankit/Desktop/GOVol3Practice.txtwith the path to your device (/dev/sdXY).
– RoVo
Jan 16 at 12:58
add a comment |
I was just reading some text file and some keys were pressed by me on keyboard and all text was gone from that text file and by mistake I closed that file by "closed with saving" option. This text file is very important for me. I have checked it as hidden file in that folder but It is not showing. I have also used command sudo strings /dev/mem but it is showing some text which I can't understand and I also used sudo strings /dev/mem | grep -r some text of file but It got paused and not showing anything.
So, I would like to know, Is there any way to go to last saved state of that text file. Please help.
data-recovery text-editor
I was just reading some text file and some keys were pressed by me on keyboard and all text was gone from that text file and by mistake I closed that file by "closed with saving" option. This text file is very important for me. I have checked it as hidden file in that folder but It is not showing. I have also used command sudo strings /dev/mem but it is showing some text which I can't understand and I also used sudo strings /dev/mem | grep -r some text of file but It got paused and not showing anything.
So, I would like to know, Is there any way to go to last saved state of that text file. Please help.
data-recovery text-editor
data-recovery text-editor
asked Jan 16 at 11:56
ankitankit
1
1
1
this answer on a similar question might help: askubuntu.com/a/3912/631600
– RoVo
Jan 16 at 12:03
@RoVo Thanks for the response. I have used extundelete but after running the command , it is showing "Bad magic number in super-block when trying to open filesystem /dev/sda4 " . I am also new to ubuntu. Can you please help ?
– ankit
Jan 16 at 12:34
the answer i linked isgrep -a -B 25 -A 100 'containing string' /dev/sda1 > result.txt
– RoVo
Jan 16 at 12:35
@RoVo , I have used it but it is showing no such file or directory although path is correct. Please check where I have written wrong in the command : grep -a -B 25 -A 100 'gateoverflow.in' /home/ankit/Desktop/GOVol3Practice.txt > result.txt ....My file has name GOVol3Practice and it is on Desktop.
– ankit
Jan 16 at 12:53
Replace/home/ankit/Desktop/GOVol3Practice.txtwith the path to your device (/dev/sdXY).
– RoVo
Jan 16 at 12:58
add a comment |
1
this answer on a similar question might help: askubuntu.com/a/3912/631600
– RoVo
Jan 16 at 12:03
@RoVo Thanks for the response. I have used extundelete but after running the command , it is showing "Bad magic number in super-block when trying to open filesystem /dev/sda4 " . I am also new to ubuntu. Can you please help ?
– ankit
Jan 16 at 12:34
the answer i linked isgrep -a -B 25 -A 100 'containing string' /dev/sda1 > result.txt
– RoVo
Jan 16 at 12:35
@RoVo , I have used it but it is showing no such file or directory although path is correct. Please check where I have written wrong in the command : grep -a -B 25 -A 100 'gateoverflow.in' /home/ankit/Desktop/GOVol3Practice.txt > result.txt ....My file has name GOVol3Practice and it is on Desktop.
– ankit
Jan 16 at 12:53
Replace/home/ankit/Desktop/GOVol3Practice.txtwith the path to your device (/dev/sdXY).
– RoVo
Jan 16 at 12:58
1
1
this answer on a similar question might help: askubuntu.com/a/3912/631600
– RoVo
Jan 16 at 12:03
this answer on a similar question might help: askubuntu.com/a/3912/631600
– RoVo
Jan 16 at 12:03
@RoVo Thanks for the response. I have used extundelete but after running the command , it is showing "Bad magic number in super-block when trying to open filesystem /dev/sda4 " . I am also new to ubuntu. Can you please help ?
– ankit
Jan 16 at 12:34
@RoVo Thanks for the response. I have used extundelete but after running the command , it is showing "Bad magic number in super-block when trying to open filesystem /dev/sda4 " . I am also new to ubuntu. Can you please help ?
– ankit
Jan 16 at 12:34
the answer i linked is
grep -a -B 25 -A 100 'containing string' /dev/sda1 > result.txt– RoVo
Jan 16 at 12:35
the answer i linked is
grep -a -B 25 -A 100 'containing string' /dev/sda1 > result.txt– RoVo
Jan 16 at 12:35
@RoVo , I have used it but it is showing no such file or directory although path is correct. Please check where I have written wrong in the command : grep -a -B 25 -A 100 'gateoverflow.in' /home/ankit/Desktop/GOVol3Practice.txt > result.txt ....My file has name GOVol3Practice and it is on Desktop.
– ankit
Jan 16 at 12:53
@RoVo , I have used it but it is showing no such file or directory although path is correct. Please check where I have written wrong in the command : grep -a -B 25 -A 100 'gateoverflow.in' /home/ankit/Desktop/GOVol3Practice.txt > result.txt ....My file has name GOVol3Practice and it is on Desktop.
– ankit
Jan 16 at 12:53
Replace
/home/ankit/Desktop/GOVol3Practice.txt with the path to your device (/dev/sdXY).– RoVo
Jan 16 at 12:58
Replace
/home/ankit/Desktop/GOVol3Practice.txt with the path to your device (/dev/sdXY).– RoVo
Jan 16 at 12:58
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1110243%2frestoring-last-saved-text-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1110243%2frestoring-last-saved-text-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
this answer on a similar question might help: askubuntu.com/a/3912/631600
– RoVo
Jan 16 at 12:03
@RoVo Thanks for the response. I have used extundelete but after running the command , it is showing "Bad magic number in super-block when trying to open filesystem /dev/sda4 " . I am also new to ubuntu. Can you please help ?
– ankit
Jan 16 at 12:34
the answer i linked is
grep -a -B 25 -A 100 'containing string' /dev/sda1 > result.txt– RoVo
Jan 16 at 12:35
@RoVo , I have used it but it is showing no such file or directory although path is correct. Please check where I have written wrong in the command : grep -a -B 25 -A 100 'gateoverflow.in' /home/ankit/Desktop/GOVol3Practice.txt > result.txt ....My file has name GOVol3Practice and it is on Desktop.
– ankit
Jan 16 at 12:53
Replace
/home/ankit/Desktop/GOVol3Practice.txtwith the path to your device (/dev/sdXY).– RoVo
Jan 16 at 12:58