Unable to find my files, but they take up space
I have a strong suspicion you have another partition mounted on /home
. When you booted to a live USB, you didn't mount that partition, so files copied to your home directory were copied to your home directory on the partition mounted on /
. When Ubuntu boots and mounts something on /home
, the old contents are effectively inaccessible until you unmount /home
.
You can bind mount /
elsewhere to access the directory masked by other mounts:
mkdir foo
sudo mount --bind / foo
du -sh foo/home
If you open a terminal and cd /
then this command
sudo du -aBM -d 1 . | sort -nr | head -20
will show you the 20 largest directories (including subdirs) in your file system - it does take a while to run the first time. You can then change to what looks like a larger than expected directory, and run the command again, looking for again bigger then expected directories, and hopefully you will eventually find your files.
chick@dad:/$ sudo du -aBM -d 1 . | sort -nr | head -20
[sudo] password for chick:
du: cannot access './proc/30738/task/30738/fd/4': No such file or directory
du: cannot access './proc/30738/task/30738/fdinfo/4': No such file or directory
du: cannot access './proc/30738/fd/3': No such file or directory
du: cannot access './proc/30738/fdinfo/3': No such file or directory
du: cannot access './run/user/1000/gvfs': Permission denied
655023M .
645220M ./home
5481M ./usr
2049M ./swapfile
860M ./lib
668M ./var
491M ./opt
201M ./boot
17M ./sbin
16M ./etc
15M ./bin
11M ./run
1M ./tmp
1M ./srv
1M ./snap
1M ./root
1M ./mnt
1M ./media
1M ./lost+found
1M ./lib64
Step 0. Read man locate
.
Step 1. Ensure the locate
database is up-to-date:
sudo /etc/cron.daily/locate
This will take several minutes - have patience.
Step 2. Use locate
to find one of your files that has a unique-to-you name. E.g.:
locate GeorgeRomero_Birth_Certificate
(if your name is "George Romero". Mine isn't, YMMV.)
Step 3. Read man mv
and consider using mv
to move a whole directory structure to where you want it. E.g., if the Step 2 locate showed:
/some/where/Documents/GeorgeRomero_Birth_Certificate
you could do something like mv --target-directory=$HOME /some/where/Documents
.