Results 1 to 4 of 4

Thread: retrieving file structure of unmounted disk

  1. #1
    Join Date
    Oct 2008

    Question retrieving file structure of unmounted disk

    I used to mount an internal hard disk on /media/storage/
    Now the HDD is formatted and recovering the data may or may not be possible.

    But if I could just get the list of all files and directory list that used to reside in /media/storage that would be great.

    Question: Does ubuntu index or cache the list of for filenames,directories information of external drives? Where can I get this information? If there's list that I can retrieve from temp files, or autobackup etc? Where to locate this?
    This is not a data recovery request, I just need to get the file structure of unmounted disk that used to mount on /media/storage

    Thank you.

  2. #2
    Join Date
    Aug 2020
    Ubuntu 20.04 Focal Fossa

    Re: retrieving file structure of unmounted disk

    Maybe you should edit the title to: "Retrieving file structure of unmounted and formatted disk", since this is definitely harder than if it's just unmounted.

    In addition to that, I unfortunately have no clue!
    Supermicro Server :: Atom C3558 (4) @ 2.2 GHz :: 32 GB DDR4-2400 :: 512 GB NVMe :: 4x 2 TB SSD @ RAID-Z
    Raspberry Pi 4 Server :: BCM2711 (4) @ 1.5 GHz :: 4 GB DDR4-3200 :: 32 GB MicroSD

  3. #3
    Join Date
    Nov 2009
    Catalunya, Spain
    Ubuntu 18.04 Bionic Beaver

    Re: retrieving file structure of unmounted disk

    I am not familiar with any place where the folder structure would be kept except on the disk itself.

    But even if the disk is formatted, you could still recover a lot of the data if you haven't used it much after the formatting. That is the important part.

    Also, did you simply format the existing partitions or you created new partition table and new partitions?
    Ubuntu 18.04 LTS 64bit

  4. #4
    Join Date
    Mar 2010
    Ubuntu Mate 16.04 Xenial Xerus

    Re: retrieving file structure of unmounted disk

    Unix systems do what they are told, in general.
    If you want a list of files on a system, creating one is easy. A few different ways:
    ls -lR /  > $HOME/ls-lR.txt
    find / -type f -size +5b > $HOME/all-files.txt
    If you want a directory structure, that is also trivial to create:
    tree -d / > $HOME/all-dirs.txt
    find / -type d > $HOME/all-dirs2.txt
    But these are the admin's task to create and update. I do stuff like this weekly via cron.

    And it is also the role of the admin to create any backups desired. Backups solve at least 1001 problems on computers. I don't understand why there is such avoidance to do this small task. Not knowing how is where we all begin. Gaining that knowledge is possible.
    Last edited by TheFu; September 18th, 2020 at 08:24 PM.

Tags for this Thread


Posting Permissions

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