How to recover a modified file in Linux [duplicate]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
0
down vote

favorite













This question already has an answer here:



  • Recovering accidentally deleted files

    9 answers



I wanted to make a copy of my file and I generally use



cat file1> file2


This time, I typed mistakenly



cat file1> file1


Because of which the the contents of my original file are lost. Is there any way to recover it?







share|improve this question











marked as duplicate by dr01, Henrik, schily, Jesse_b, G-Man Jul 27 at 15:19


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.




















    up vote
    0
    down vote

    favorite













    This question already has an answer here:



    • Recovering accidentally deleted files

      9 answers



    I wanted to make a copy of my file and I generally use



    cat file1> file2


    This time, I typed mistakenly



    cat file1> file1


    Because of which the the contents of my original file are lost. Is there any way to recover it?







    share|improve this question











    marked as duplicate by dr01, Henrik, schily, Jesse_b, G-Man Jul 27 at 15:19


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite












      This question already has an answer here:



      • Recovering accidentally deleted files

        9 answers



      I wanted to make a copy of my file and I generally use



      cat file1> file2


      This time, I typed mistakenly



      cat file1> file1


      Because of which the the contents of my original file are lost. Is there any way to recover it?







      share|improve this question












      This question already has an answer here:



      • Recovering accidentally deleted files

        9 answers



      I wanted to make a copy of my file and I generally use



      cat file1> file2


      This time, I typed mistakenly



      cat file1> file1


      Because of which the the contents of my original file are lost. Is there any way to recover it?





      This question already has an answer here:



      • Recovering accidentally deleted files

        9 answers









      share|improve this question










      share|improve this question




      share|improve this question









      asked Jul 27 at 6:28









      nshwal

      41




      41




      marked as duplicate by dr01, Henrik, schily, Jesse_b, G-Man Jul 27 at 15:19


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






      marked as duplicate by dr01, Henrik, schily, Jesse_b, G-Man Jul 27 at 15:19


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote













          No, there is no practical* way to recover this file.



          *In principle, that actual data are still located on the storage medium, but locating and recovering these data (before some other data is written over all or part of the file) is practically impossible.






          share|improve this answer




























            up vote
            0
            down vote













            It is not practical, unless the data is worth a lot, and you stop the machine immediately, take it to an expert, pay them lots of money, and get lucky.



            For the future.



            What you need is a revision control system. It won't help this time, but will in the future.



            A revision control system, keeps a history of your files. Here is an example session.



            hg init
            hg add file1
            hg commit -m "add initial file1"
            change file1
            hg commit -m "add/change …"
            cat file1> file1
            hg revert file1


            You can even go back farther.



            hg update -r 1 #goes to initial version


            svn is an easy one for beginners, and still powerful. Mercurial (hg), has more features, so a bit harder to learn. svn is also better for some document types (un-mergable: Office documents).






            share|improve this answer




























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              1
              down vote













              No, there is no practical* way to recover this file.



              *In principle, that actual data are still located on the storage medium, but locating and recovering these data (before some other data is written over all or part of the file) is practically impossible.






              share|improve this answer

























                up vote
                1
                down vote













                No, there is no practical* way to recover this file.



                *In principle, that actual data are still located on the storage medium, but locating and recovering these data (before some other data is written over all or part of the file) is practically impossible.






                share|improve this answer























                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  No, there is no practical* way to recover this file.



                  *In principle, that actual data are still located on the storage medium, but locating and recovering these data (before some other data is written over all or part of the file) is practically impossible.






                  share|improve this answer













                  No, there is no practical* way to recover this file.



                  *In principle, that actual data are still located on the storage medium, but locating and recovering these data (before some other data is written over all or part of the file) is practically impossible.







                  share|improve this answer













                  share|improve this answer



                  share|improve this answer











                  answered Jul 27 at 6:32









                  SabreWolfy

                  6142824




                  6142824






















                      up vote
                      0
                      down vote













                      It is not practical, unless the data is worth a lot, and you stop the machine immediately, take it to an expert, pay them lots of money, and get lucky.



                      For the future.



                      What you need is a revision control system. It won't help this time, but will in the future.



                      A revision control system, keeps a history of your files. Here is an example session.



                      hg init
                      hg add file1
                      hg commit -m "add initial file1"
                      change file1
                      hg commit -m "add/change …"
                      cat file1> file1
                      hg revert file1


                      You can even go back farther.



                      hg update -r 1 #goes to initial version


                      svn is an easy one for beginners, and still powerful. Mercurial (hg), has more features, so a bit harder to learn. svn is also better for some document types (un-mergable: Office documents).






                      share|improve this answer

























                        up vote
                        0
                        down vote













                        It is not practical, unless the data is worth a lot, and you stop the machine immediately, take it to an expert, pay them lots of money, and get lucky.



                        For the future.



                        What you need is a revision control system. It won't help this time, but will in the future.



                        A revision control system, keeps a history of your files. Here is an example session.



                        hg init
                        hg add file1
                        hg commit -m "add initial file1"
                        change file1
                        hg commit -m "add/change …"
                        cat file1> file1
                        hg revert file1


                        You can even go back farther.



                        hg update -r 1 #goes to initial version


                        svn is an easy one for beginners, and still powerful. Mercurial (hg), has more features, so a bit harder to learn. svn is also better for some document types (un-mergable: Office documents).






                        share|improve this answer























                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          It is not practical, unless the data is worth a lot, and you stop the machine immediately, take it to an expert, pay them lots of money, and get lucky.



                          For the future.



                          What you need is a revision control system. It won't help this time, but will in the future.



                          A revision control system, keeps a history of your files. Here is an example session.



                          hg init
                          hg add file1
                          hg commit -m "add initial file1"
                          change file1
                          hg commit -m "add/change …"
                          cat file1> file1
                          hg revert file1


                          You can even go back farther.



                          hg update -r 1 #goes to initial version


                          svn is an easy one for beginners, and still powerful. Mercurial (hg), has more features, so a bit harder to learn. svn is also better for some document types (un-mergable: Office documents).






                          share|improve this answer













                          It is not practical, unless the data is worth a lot, and you stop the machine immediately, take it to an expert, pay them lots of money, and get lucky.



                          For the future.



                          What you need is a revision control system. It won't help this time, but will in the future.



                          A revision control system, keeps a history of your files. Here is an example session.



                          hg init
                          hg add file1
                          hg commit -m "add initial file1"
                          change file1
                          hg commit -m "add/change …"
                          cat file1> file1
                          hg revert file1


                          You can even go back farther.



                          hg update -r 1 #goes to initial version


                          svn is an easy one for beginners, and still powerful. Mercurial (hg), has more features, so a bit harder to learn. svn is also better for some document types (un-mergable: Office documents).







                          share|improve this answer













                          share|improve this answer



                          share|improve this answer











                          answered Jul 27 at 7:02









                          ctrl-alt-delor

                          8,54031946




                          8,54031946












                              Popular posts from this blog

                              How to check contact read email or not when send email to Individual?

                              Bahrain

                              Postfix configuration issue with fips on centos 7; mailgun relay