I have an external hard drive which shows that the drive has 48GB of data. But the folders that are visible are only totaling to ~8GB. I tried to the 'show hidden files' but nothing extra is visible.
Any help is appreciated.
There are many possible reasons why your drive's partition(s) is/are invisible.
In order to be sure about the actual size of your external hard drive, actual partitions, partition sizes, partition types, used space and free space on each partition, connect your external hard drive, then open a shell terminal emulator window and run this command:
sudo df -hT
If you confirm that in fact there is/are partition(s) but it's/they're not visible, run Gparted to see if the partition(s) filesystem type is wrong (should be e.g. EXT4). If you don't have Gparted you can install it by running this command:
sudo apt-get install gparted -y
If your drive's partition(s) is/are of NTFS type, install NTFS-3G:
sudo apt-get install ntfs-3g -y
...and then try using it to mount your partition. E.g. (assuming that your external hard drive's first partition is SDB1 and that its second partition - SDB2 - is the invisible one):
mkdir /mnt/myexternaldrive ; sudo mount -t ntfs-3g /dev/sdb2 /mnt/myexternaldrive ; cd /mnt/myexternaldrive ; ls -l
If the problem isn't a specific partition being invisible but instead some files being visible and others invisible inside the same partition, it's possible that such invisible files are encrypted, in which case they can only be decrypted by the same method used to encrypt them. But if they're not encrypted then it's possible that the partition and/or disk surface is damaged.
In order to check the disk's partition(s), assuming that it's a disk with EXT2/3/4 partition(s), you can run this command on your connected but unmounted external hard disk (assuming that it's mapped at /dev/sdb
):
e2fsck -cfpv /dev/sdb
c
will cause e2fsck to check for badblocks, f
will force-check the drive even if it doesn't look like it needs cleaning, p
will cause e2fsck to try to automatically repair the disk, and v
will make the process verbose.
Reboot the system and then run e4defrag on your mounted external hard drive:
sudo e4defrag -c /path/to/myfiles
Note: if e4defrag is not available, issue the shell command sudo apt-get install e2fsprogs
in order to make e4defrag available on your system.
After so much of searching over the web, I tried to recover them as deleted files using PhotoRec and was able to recover the files but not the folder structure.
I just got a bunch of sequentially numbered folder with (what I assume) to be all my files. I checked the number of total files and the size of the data, it roughly matches what I was missing (~47GB).
48GB
of data?