FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 20
  1. #1
    Join Date
    Sep 2006
    Posts
    1,581

    Recover deleted files

    Hi Friends,

    I seem to have deleted one .html file, which I had created manually long time ago by exporting many bookmarks from Firefox browser. This deletion was a mistake and it happened not more than 30 days ago. Can I recover this .html file with TestDisk (Photorec)?

    Is there a command, which can give me a list of files of all types deleted manually by me? I am running Fedora 27 Workstation 64 bit.

    Thanks.

    https://imgur.com/a/mM27AFd
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

  2. #2
    Join Date
    Sep 2006
    Posts
    1,581

    Re: Recover deleted files

    I just installed TestDisk package and ran it in a terminal as root as described at this URL.

    https://www.tecmint.com/photorec-rec...iles-in-linux/

    I could run it only for 20 minutes or so as I had to go out, but I see a few folders named recup_dir.n in my home directory. I have already tried deleting these folders manually as root, but they continue to be there even after 5 reboots. I had actually created a folder to /Downloads directory to save recovered files when I ran the TeskDisk package for the very 1st time as root. I deleted it manually without any problems though. Can you please guide me as to how I can delete these unwanted folders. Thanks.

    https://imgur.com/a/b58whQU

    Some folders and files in the screenshot have been deliberately removed to ensure privacy.
    Last edited by tech291083; 10th June 2018 at 05:24 PM.
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

  3. #3
    Join Date
    Sep 2006
    Posts
    1,581

    Re: Recover deleted files

    Quote Originally Posted by donatom
    The contents of /sys/firmware indicate that your system is using MBR (legacy) boot (as you know)
    Thanks.


    "dnf update (or dnf upgrade)" updates the present version (Fedora 28, etc.).
    Ok.

    dnf system-upgrade is used when moving up to the newest version (Fedora 27 to Fedora 28, etc).
    Right.

    Here is the wiki for system-upgrade: https://fedoraproject.org/wiki/DNF_system_upgrade
    This is going to be very useful.

    It works well, but there is downtime (up to an hour) when you can't use your computer. When you use a custom iso to upgrade to the next system, there is very little down-time (less than 10 minutes).
    Yes, I fully agree. But is now possible to upgrade to the latest available release of Fedora from any release of the same on one's system? I mean if I am running Fedora 25, then is it possible to upgrade to Fedora 30?

    Good luck -- and have lots of fun -- in your Fedora (Linux) endeavors.
    I need a lot of good luck. I am very grateful to many forum members like yourself, who have provided me with valuable guidance over the last one decade or so. Your help is a great blessing. I can not thank you enough. I have created a Fedora commands blog. Please check it out and suggest me whatever you think I should include.
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

  4. #4
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    7,283

    Re: Recover deleted files

    >I mean if I am running Fedora 25, then is it possible to upgrade to Fedora 30?

    That's covered in bullet 4.5 in the page about dnf system upgrade

  5. #5
    PabloTwo's Avatar
    PabloTwo is offline "Registered User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    7,653

    Re: Recover deleted files

    Your screenshot shows the highlighted folders with a padlock on them. I am guessing that that means those folders, and possibly all the files contained in those folders have the immutable attribute set on them. Meaning, they cannot be deleted. You can check that with the lsattr command and if the "i" bit is set, then they are made immutable. If so, you can unset it with the chattr command. See here for a simple explaination.

    I don't know, but testdisk itself may have a function to get rid of them. I've never used the program.

  6. #6
    Join Date
    Sep 2006
    Posts
    1,581

    Re: Recover deleted files

    Quote Originally Posted by PabloTwo
    Your screenshot shows the highlighted folders with a padlock on them. I am guessing that that means those folders, and possibly all the files contained in those folders have the immutable attribute set on them. Meaning, they cannot be deleted.
    Right.

    You can check that with the lsattr command and if the "i" bit is set, then they are made immutable. If so, you can unset it with the chattr command.
    Code:
    [john@localhost ~]$ lsattr |grep -i recup
    -----------I--e---- ./recup_dir.16
    -----------I--e---- ./recup_dir.4
    -----------I--e---- ./recup_dir.17
    -----------I--e---- ./recup_dir.15
    --------------e---- ./recup_dir.22
    -----------I--e---- ./recup_dir.20
    -----------I--e---- ./recup_dir.9
    -----------I--e---- ./recup_dir.10
    -----------I--e---- ./recup_dir.7
    -----------I--e---- ./recup_dir.1
    -----------I--e---- ./recup_dir.6
    -----------I--e---- ./recup_dir.3
    -----------I--e---- ./recup_dir.8
    -----------I--e---- ./recup_dir.2
    -----------I--e---- ./recup_dir.13
    -----------I--e---- ./recup_dir.12
    -----------I--e---- ./recup_dir.14
    -----------I--e---- ./recup_dir.21
    -----------I--e---- ./recup_dir.19
    -----------I--e---- ./recup_dir.11
    -----------I--e---- ./recup_dir.18
    -----------I--e---- ./recup_dir.5
    [john@localhost ~]$
    I don't know, but testdisk itself may have a function to get rid of them. I've never used the program.
    OK.

    See here for a simple explaination.
    Thanks a lot.
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

  7. #7
    Join Date
    Sep 2006
    Posts
    1,581

    Re: Recover deleted files

    Dear Admin,

    please remove post #3 of this thread. it was created by mistake. please accept my apology. many thanks.
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

  8. #8
    Join Date
    Sep 2006
    Posts
    1,581

    Re: Recover deleted files

    I have tried to remove the "i" bit with the following command as root, but the padlocks are still there. i am not able to delete these folders both as root and normal user. Please help. thanks.
    Code:
    [root@localhost john]# chattr -i recup_dir.*
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

  9. #9
    Join Date
    Sep 2006
    Posts
    1,581

    Re: Recover deleted files

    After starting this thread, I was discussing the usefulness of TestDisk package with a friend of mine who is also running Fedora 27 Workstation 64 bit on his PC. He was eager to learn how to use TestDisk in order to recover some of his own photos, so I installed the same on his PC and then proceeded to teach him the process in a terminal as root only to find out that I could not choose the right option as shown in image 4 (Select a media....) at this URL posted by me. I watched a couple of YouTube videos on how to use TestDisk, but could not figure out anything. Can you please help? Thanks.

    https://imgur.com/a/hyIqqV9
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

  10. #10
    PabloTwo's Avatar
    PabloTwo is offline "Registered User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    7,653

    Re: Recover deleted files

    Quote Originally Posted by tech291083
    I have tried to remove the "i" bit with the following command as root, but the padlocks are still there. i am not able to delete these folders both as root and normal user. Please help. thanks.
    Code:
    [root@localhost john]# chattr -i recup_dir.*
    As seen in your posted output of the lsattr command, the "i" bit was not set on those folders. But the "I" (capital i) was. From "man lsattr""
    The 'I' attribute is used by the htree code to indicate that a directory is being indexed using hashed
    trees. It may not be set or reset using chattr(1), although it can be displayed by lsattr(1).
    "i" and "I" are not the same thing. You should try, as root in the same directory as those recup_dir.* files from the command line:
    Code:
    # rm -rf recup_dir.*
    Last edited by PabloTwo; 11th June 2018 at 03:52 PM.

  11. #11
    Join Date
    Jan 2005
    Posts
    63

    Re: Recover deleted files

    Quote Originally Posted by PabloTwo
    As seen in your posted output of the lsattr command, the "i" bit was not set on those folders. But the "I" (capital i) was. From "man lsattr""


    "i" and "I" are not the same thing. You should try, as root in the same directory as those recup_dir.* files from the command line:
    Code:
    # rm -rf recup_dir.*
    Exactly, thank you.
    Server:Supermicro X9DRD-7LN4F-JBOD | (2) Xeon E5-2670 | 32GB DDR3 ECC Registered |Ubuntu -16.04 LTS
    Desktop: Asrock 79 ext4 | Intel Xeon E2650 | 16GB DDR3 1600 | Fedora 28
    Laptop: Dell Inspiron I5 7567 | Intel Core i5 |8GB RAM |GTX 1050 | Ubuntu -16.04 LTS

  12. #12
    Join Date
    Sep 2006
    Posts
    1,581

    Re: Recover deleted files

    The 'I' attribute is used by the htree code to indicate that a directory is being indexed using hashed
    trees. It may not be set or reset using chattr(1), although it can be displayed by lsattr(1).
    Right. Got it.

    "i" and "I" are not the same thing.
    OK. This is news to me. Never knew that before, thanks.
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

  13. #13
    Join Date
    Sep 2006
    Posts
    1,581

    Re: Recover deleted files

    # rm -rf recup_dir.*
    This command worked. All the folders are gone now. Thanks a lot.
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

  14. #14
    Join Date
    Sep 2006
    Posts
    1,581

    Re: Recover deleted files

    Quote Originally Posted by tech291083
    Hi Friends,

    I seem to have deleted one .html file, which I had created manually long time ago by exporting many bookmarks from Firefox browser. This deletion was a mistake and it happened not more than 30 days ago. Can I recover this .html file with TestDisk (Photorec)?

    Is there a command, which can give me a list of files of all types deleted manually by me? I am running Fedora 27 Workstation 64 bit.

    Thanks.

    https://imgur.com/a/mM27AFd
    Is there any other free and easy to use tool for Fedora that can help me recover my data? Thanks
    Last edited by tech291083; 12th June 2018 at 09:59 AM.
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

  15. #15
    Join Date
    Sep 2006
    Posts
    1,581

    Re: Recover deleted files

    Finally, I was able to run Photorec (TestDisk) in a terminal as root yesterday. It took 17+ hours in one go only. Total size of files recovered was about 192 GB. I had created a folder named "Recovered Files" in the default Video folder of the system before I ran Photorec and was able to save all the recovered files there only. Now, I am a little confused as to how I can find out the one .html file named "bookmarks", which I had created manually long time ago by exporting many bookmarks from Firefox browser. It contained more than 200 really useful bookmarks (links to sites). But not more than a month ago, I deleted this file by mistake and the only reason I have done this whole data recovery exercise is to get this .html file back.

    I have tried to search this file in the "Recovered Files" folder, but it is not there. Plus, more than 2600 folders have been created in the parent "Recovered Files" folder during this exercise. How can I recover my beloved .html file after so much effort with TestDisk (Photorec)? Have you ever used TestDisk (Photorec) yourself? If yes, then please guide me as to how I should find what I am desperately looking for. Thanks.

    Please have a look at the link below. It contains screenshots. Thanks.

    https://imgur.com/a/aK5Jnaz
    Last edited by tech291083; 13th June 2018 at 03:11 PM.
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Recover deleted files
    By vaibhavatul47 in forum Using Fedora
    Replies: 8
    Last Post: 11th February 2012, 08:45 PM
  2. How To Recover The Deleted Files ???
    By BProgrammer in forum Using Fedora
    Replies: 5
    Last Post: 2nd February 2011, 09:24 PM
  3. recover deleted or disapeared files?
    By betz in forum Using Fedora
    Replies: 4
    Last Post: 18th May 2008, 03:54 AM
  4. How to recover deleted files?
    By ims.analyst in forum Installation, Upgrades and Live Media
    Replies: 1
    Last Post: 20th February 2008, 11:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •