Score:1

How to retrieve/recover an accidently removed file in ubuntu?

in flag

I was working with C++ file (.cpp) and just wanted to rename the name of file but unfortunately I used rm and it deleted that file, I checked the trash but cannot find the file there, is there any way I can recover my file?

This is the command I used.

rm infix_to_postfix.cpp infix_to_postfix_and_prefix.cpp
cn flag
Ray
As far as I know, no, there isn't. Not if you used the command line to remove it. If there is, I guess I'd be interested in finding out as well!
cocomac avatar
cn flag
Does this answer your question? [Can files/directories deleted with rm be restored?](https://askubuntu.com/questions/6698/can-files-directories-deleted-with-rm-be-restored)
davidkonrad avatar
ru flag
Take a look at [**photorec**](https://www.cgsecurity.org/wiki/PhotoRec_Step_By_Step) it actually works very well and is not targeted against image-files only, have seen surprising results were I never would have believed files could be restored. Use it with care (!!), or you end up with a zillion refound files you have to look through manually :)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.