How can I recover files I deleted with find … -delete?












1














By mistake, perform the following command:



find ./ type f "*.jpg" -delete


My intention was to delete all the .jpg files, but instead deleted everything that was there. My question is if there is any way to recover those files or in which directory they will be now, because in the recycle bin they are not.



The correct command was:



find ./ type f name "*.jpg" -delete









share|improve this question
























  • If you want to recover deleted files, you should shutdown and not use the drive until you are ready to do recovery work. It is particularly important to avoid mounting the drive. Instead you should boot the computer from another drive, for example an Ubuntu live drive (DVD, USB pendrive, memory card) made from an Ubuntu iso file. See this link, ubuntuforums.org/…: Advanced repair of a partition table, file system and/or recovery of files
    – sudodus
    Jun 20 '17 at 7:31












  • I disagree Zanna. The command will first delete the content of . and then show a lot of errors, 1 of which is 'cannot delete ./'. Sorry VipPunk, but I think your files are gone. I hope you have a backup??
    – user680858
    Jun 20 '17 at 7:31












  • Btw for future reference - to avoid these specific kinds of problems, first run the find command in a way that you display the filtered files rather than delete right away. Then youll see from the output if your command works as you thought.
    – Carolus
    Apr 18 at 6:02
















1














By mistake, perform the following command:



find ./ type f "*.jpg" -delete


My intention was to delete all the .jpg files, but instead deleted everything that was there. My question is if there is any way to recover those files or in which directory they will be now, because in the recycle bin they are not.



The correct command was:



find ./ type f name "*.jpg" -delete









share|improve this question
























  • If you want to recover deleted files, you should shutdown and not use the drive until you are ready to do recovery work. It is particularly important to avoid mounting the drive. Instead you should boot the computer from another drive, for example an Ubuntu live drive (DVD, USB pendrive, memory card) made from an Ubuntu iso file. See this link, ubuntuforums.org/…: Advanced repair of a partition table, file system and/or recovery of files
    – sudodus
    Jun 20 '17 at 7:31












  • I disagree Zanna. The command will first delete the content of . and then show a lot of errors, 1 of which is 'cannot delete ./'. Sorry VipPunk, but I think your files are gone. I hope you have a backup??
    – user680858
    Jun 20 '17 at 7:31












  • Btw for future reference - to avoid these specific kinds of problems, first run the find command in a way that you display the filtered files rather than delete right away. Then youll see from the output if your command works as you thought.
    – Carolus
    Apr 18 at 6:02














1












1








1







By mistake, perform the following command:



find ./ type f "*.jpg" -delete


My intention was to delete all the .jpg files, but instead deleted everything that was there. My question is if there is any way to recover those files or in which directory they will be now, because in the recycle bin they are not.



The correct command was:



find ./ type f name "*.jpg" -delete









share|improve this question















By mistake, perform the following command:



find ./ type f "*.jpg" -delete


My intention was to delete all the .jpg files, but instead deleted everything that was there. My question is if there is any way to recover those files or in which directory they will be now, because in the recycle bin they are not.



The correct command was:



find ./ type f name "*.jpg" -delete






command-line files data-recovery find






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 21 at 10:45









Zanna

50k13131238




50k13131238










asked Jun 20 '17 at 6:28









VipPunkJoshers Droopy

1084




1084












  • If you want to recover deleted files, you should shutdown and not use the drive until you are ready to do recovery work. It is particularly important to avoid mounting the drive. Instead you should boot the computer from another drive, for example an Ubuntu live drive (DVD, USB pendrive, memory card) made from an Ubuntu iso file. See this link, ubuntuforums.org/…: Advanced repair of a partition table, file system and/or recovery of files
    – sudodus
    Jun 20 '17 at 7:31












  • I disagree Zanna. The command will first delete the content of . and then show a lot of errors, 1 of which is 'cannot delete ./'. Sorry VipPunk, but I think your files are gone. I hope you have a backup??
    – user680858
    Jun 20 '17 at 7:31












  • Btw for future reference - to avoid these specific kinds of problems, first run the find command in a way that you display the filtered files rather than delete right away. Then youll see from the output if your command works as you thought.
    – Carolus
    Apr 18 at 6:02


















  • If you want to recover deleted files, you should shutdown and not use the drive until you are ready to do recovery work. It is particularly important to avoid mounting the drive. Instead you should boot the computer from another drive, for example an Ubuntu live drive (DVD, USB pendrive, memory card) made from an Ubuntu iso file. See this link, ubuntuforums.org/…: Advanced repair of a partition table, file system and/or recovery of files
    – sudodus
    Jun 20 '17 at 7:31












  • I disagree Zanna. The command will first delete the content of . and then show a lot of errors, 1 of which is 'cannot delete ./'. Sorry VipPunk, but I think your files are gone. I hope you have a backup??
    – user680858
    Jun 20 '17 at 7:31












  • Btw for future reference - to avoid these specific kinds of problems, first run the find command in a way that you display the filtered files rather than delete right away. Then youll see from the output if your command works as you thought.
    – Carolus
    Apr 18 at 6:02
















If you want to recover deleted files, you should shutdown and not use the drive until you are ready to do recovery work. It is particularly important to avoid mounting the drive. Instead you should boot the computer from another drive, for example an Ubuntu live drive (DVD, USB pendrive, memory card) made from an Ubuntu iso file. See this link, ubuntuforums.org/…: Advanced repair of a partition table, file system and/or recovery of files
– sudodus
Jun 20 '17 at 7:31






If you want to recover deleted files, you should shutdown and not use the drive until you are ready to do recovery work. It is particularly important to avoid mounting the drive. Instead you should boot the computer from another drive, for example an Ubuntu live drive (DVD, USB pendrive, memory card) made from an Ubuntu iso file. See this link, ubuntuforums.org/…: Advanced repair of a partition table, file system and/or recovery of files
– sudodus
Jun 20 '17 at 7:31














I disagree Zanna. The command will first delete the content of . and then show a lot of errors, 1 of which is 'cannot delete ./'. Sorry VipPunk, but I think your files are gone. I hope you have a backup??
– user680858
Jun 20 '17 at 7:31






I disagree Zanna. The command will first delete the content of . and then show a lot of errors, 1 of which is 'cannot delete ./'. Sorry VipPunk, but I think your files are gone. I hope you have a backup??
– user680858
Jun 20 '17 at 7:31














Btw for future reference - to avoid these specific kinds of problems, first run the find command in a way that you display the filtered files rather than delete right away. Then youll see from the output if your command works as you thought.
– Carolus
Apr 18 at 6:02




Btw for future reference - to avoid these specific kinds of problems, first run the find command in a way that you display the filtered files rather than delete right away. Then youll see from the output if your command works as you thought.
– Carolus
Apr 18 at 6:02










2 Answers
2






active

oldest

votes


















3














Using find ./ type f name "*.jpg" -delete what you did was searching in this paths:



./
type
f
name
"*.jpg"


and then find runs a -delete on everything that was found.



What you can do is use recovery tools like testdisk and photorec. Logically your files are gone, however they just have been unlinked (but their data still occupies disk space). I suggest you to use testdisk utility to recover them - it should work fine for you.



I wrote an answer to recover a single file here. You can also have access to testdisk step by step guide here.






share|improve this answer























  • @VipPunkJoshersDroopy, I think photorec might help you recover files.
    – sudodus
    Jun 20 '17 at 7:47












  • @Ravexina, Thanks I'll try.
    – VipPunkJoshers Droopy
    Jun 20 '17 at 14:05










  • @sudodus there is no point in using a file carver if the files are only unlinked and can selectively be restored easily with a file system-aware tool.
    – Andrea Lazzarotto
    Jun 22 '17 at 16:09










  • @AndreaLazzarotto, please tell us which system-aware tool you recommend.
    – sudodus
    Jun 22 '17 at 16:12










  • @sudodus not "system", "file system"-aware. Also, Testdisk is already written in the accepted answer so there was no need for me to mention it again. :) Or, if we are talking about NTFS, RecuperaBit (but it's not the case here, it seems).
    – Andrea Lazzarotto
    Jun 22 '17 at 18:09



















1














As for me, the easiest way is to use recovery software. Try to look at cleverfiles. With its help I recovered lost data at my pc. The best part is that it also provides a number of data protection options to prevent data loss in the future. Very convy.






share|improve this answer




















    protected by Zanna Dec 21 at 10:46



    Thank you for your interest in this question.
    Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



    Would you like to answer one of these unanswered questions instead?














    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    Using find ./ type f name "*.jpg" -delete what you did was searching in this paths:



    ./
    type
    f
    name
    "*.jpg"


    and then find runs a -delete on everything that was found.



    What you can do is use recovery tools like testdisk and photorec. Logically your files are gone, however they just have been unlinked (but their data still occupies disk space). I suggest you to use testdisk utility to recover them - it should work fine for you.



    I wrote an answer to recover a single file here. You can also have access to testdisk step by step guide here.






    share|improve this answer























    • @VipPunkJoshersDroopy, I think photorec might help you recover files.
      – sudodus
      Jun 20 '17 at 7:47












    • @Ravexina, Thanks I'll try.
      – VipPunkJoshers Droopy
      Jun 20 '17 at 14:05










    • @sudodus there is no point in using a file carver if the files are only unlinked and can selectively be restored easily with a file system-aware tool.
      – Andrea Lazzarotto
      Jun 22 '17 at 16:09










    • @AndreaLazzarotto, please tell us which system-aware tool you recommend.
      – sudodus
      Jun 22 '17 at 16:12










    • @sudodus not "system", "file system"-aware. Also, Testdisk is already written in the accepted answer so there was no need for me to mention it again. :) Or, if we are talking about NTFS, RecuperaBit (but it's not the case here, it seems).
      – Andrea Lazzarotto
      Jun 22 '17 at 18:09
















    3














    Using find ./ type f name "*.jpg" -delete what you did was searching in this paths:



    ./
    type
    f
    name
    "*.jpg"


    and then find runs a -delete on everything that was found.



    What you can do is use recovery tools like testdisk and photorec. Logically your files are gone, however they just have been unlinked (but their data still occupies disk space). I suggest you to use testdisk utility to recover them - it should work fine for you.



    I wrote an answer to recover a single file here. You can also have access to testdisk step by step guide here.






    share|improve this answer























    • @VipPunkJoshersDroopy, I think photorec might help you recover files.
      – sudodus
      Jun 20 '17 at 7:47












    • @Ravexina, Thanks I'll try.
      – VipPunkJoshers Droopy
      Jun 20 '17 at 14:05










    • @sudodus there is no point in using a file carver if the files are only unlinked and can selectively be restored easily with a file system-aware tool.
      – Andrea Lazzarotto
      Jun 22 '17 at 16:09










    • @AndreaLazzarotto, please tell us which system-aware tool you recommend.
      – sudodus
      Jun 22 '17 at 16:12










    • @sudodus not "system", "file system"-aware. Also, Testdisk is already written in the accepted answer so there was no need for me to mention it again. :) Or, if we are talking about NTFS, RecuperaBit (but it's not the case here, it seems).
      – Andrea Lazzarotto
      Jun 22 '17 at 18:09














    3












    3








    3






    Using find ./ type f name "*.jpg" -delete what you did was searching in this paths:



    ./
    type
    f
    name
    "*.jpg"


    and then find runs a -delete on everything that was found.



    What you can do is use recovery tools like testdisk and photorec. Logically your files are gone, however they just have been unlinked (but their data still occupies disk space). I suggest you to use testdisk utility to recover them - it should work fine for you.



    I wrote an answer to recover a single file here. You can also have access to testdisk step by step guide here.






    share|improve this answer














    Using find ./ type f name "*.jpg" -delete what you did was searching in this paths:



    ./
    type
    f
    name
    "*.jpg"


    and then find runs a -delete on everything that was found.



    What you can do is use recovery tools like testdisk and photorec. Logically your files are gone, however they just have been unlinked (but their data still occupies disk space). I suggest you to use testdisk utility to recover them - it should work fine for you.



    I wrote an answer to recover a single file here. You can also have access to testdisk step by step guide here.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Dec 21 at 10:45









    Sergiy Kolodyazhnyy

    69.3k9144304




    69.3k9144304










    answered Jun 20 '17 at 7:45









    Ravexina

    31.1k1481109




    31.1k1481109












    • @VipPunkJoshersDroopy, I think photorec might help you recover files.
      – sudodus
      Jun 20 '17 at 7:47












    • @Ravexina, Thanks I'll try.
      – VipPunkJoshers Droopy
      Jun 20 '17 at 14:05










    • @sudodus there is no point in using a file carver if the files are only unlinked and can selectively be restored easily with a file system-aware tool.
      – Andrea Lazzarotto
      Jun 22 '17 at 16:09










    • @AndreaLazzarotto, please tell us which system-aware tool you recommend.
      – sudodus
      Jun 22 '17 at 16:12










    • @sudodus not "system", "file system"-aware. Also, Testdisk is already written in the accepted answer so there was no need for me to mention it again. :) Or, if we are talking about NTFS, RecuperaBit (but it's not the case here, it seems).
      – Andrea Lazzarotto
      Jun 22 '17 at 18:09


















    • @VipPunkJoshersDroopy, I think photorec might help you recover files.
      – sudodus
      Jun 20 '17 at 7:47












    • @Ravexina, Thanks I'll try.
      – VipPunkJoshers Droopy
      Jun 20 '17 at 14:05










    • @sudodus there is no point in using a file carver if the files are only unlinked and can selectively be restored easily with a file system-aware tool.
      – Andrea Lazzarotto
      Jun 22 '17 at 16:09










    • @AndreaLazzarotto, please tell us which system-aware tool you recommend.
      – sudodus
      Jun 22 '17 at 16:12










    • @sudodus not "system", "file system"-aware. Also, Testdisk is already written in the accepted answer so there was no need for me to mention it again. :) Or, if we are talking about NTFS, RecuperaBit (but it's not the case here, it seems).
      – Andrea Lazzarotto
      Jun 22 '17 at 18:09
















    @VipPunkJoshersDroopy, I think photorec might help you recover files.
    – sudodus
    Jun 20 '17 at 7:47






    @VipPunkJoshersDroopy, I think photorec might help you recover files.
    – sudodus
    Jun 20 '17 at 7:47














    @Ravexina, Thanks I'll try.
    – VipPunkJoshers Droopy
    Jun 20 '17 at 14:05




    @Ravexina, Thanks I'll try.
    – VipPunkJoshers Droopy
    Jun 20 '17 at 14:05












    @sudodus there is no point in using a file carver if the files are only unlinked and can selectively be restored easily with a file system-aware tool.
    – Andrea Lazzarotto
    Jun 22 '17 at 16:09




    @sudodus there is no point in using a file carver if the files are only unlinked and can selectively be restored easily with a file system-aware tool.
    – Andrea Lazzarotto
    Jun 22 '17 at 16:09












    @AndreaLazzarotto, please tell us which system-aware tool you recommend.
    – sudodus
    Jun 22 '17 at 16:12




    @AndreaLazzarotto, please tell us which system-aware tool you recommend.
    – sudodus
    Jun 22 '17 at 16:12












    @sudodus not "system", "file system"-aware. Also, Testdisk is already written in the accepted answer so there was no need for me to mention it again. :) Or, if we are talking about NTFS, RecuperaBit (but it's not the case here, it seems).
    – Andrea Lazzarotto
    Jun 22 '17 at 18:09




    @sudodus not "system", "file system"-aware. Also, Testdisk is already written in the accepted answer so there was no need for me to mention it again. :) Or, if we are talking about NTFS, RecuperaBit (but it's not the case here, it seems).
    – Andrea Lazzarotto
    Jun 22 '17 at 18:09













    1














    As for me, the easiest way is to use recovery software. Try to look at cleverfiles. With its help I recovered lost data at my pc. The best part is that it also provides a number of data protection options to prevent data loss in the future. Very convy.






    share|improve this answer


























      1














      As for me, the easiest way is to use recovery software. Try to look at cleverfiles. With its help I recovered lost data at my pc. The best part is that it also provides a number of data protection options to prevent data loss in the future. Very convy.






      share|improve this answer
























        1












        1








        1






        As for me, the easiest way is to use recovery software. Try to look at cleverfiles. With its help I recovered lost data at my pc. The best part is that it also provides a number of data protection options to prevent data loss in the future. Very convy.






        share|improve this answer












        As for me, the easiest way is to use recovery software. Try to look at cleverfiles. With its help I recovered lost data at my pc. The best part is that it also provides a number of data protection options to prevent data loss in the future. Very convy.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jul 15 '17 at 15:07









        alanz

        111




        111

















            protected by Zanna Dec 21 at 10:46



            Thank you for your interest in this question.
            Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



            Would you like to answer one of these unanswered questions instead?



            Popular posts from this blog

            數位音樂下載

            When can things happen in Etherscan, such as the picture below?

            格利澤436b