I have an Ubuntu 22.04 OS with dual-boot to Windows 10.
The Disks breakup correctly shows my /home partition to be nearly 30% full, but I am unable to see any files/folders in the sub-folders of home (ie. Documents, Pictures, Downloads etc) where they were previously saved. As expected, I can't even see any previously installed snaps, except firefox, from a new installation I ran over the old one in a recovery attempt.
In fact, when I first encountered a directory missing all its contents, I rebooted, but it went into emergency mode, and my only choice was to re-install without formatting/erasing my home partition (as I usually do). It seems to have worked, since the home partition is indeed 30% full as earlier.
I tried $fsck$ but it didn't fix this issue. Please help me diagnose and fix this problem so I can recover my files/folders and at least back them up.
Edit:
grep /home /etc/mtab
returns the string /dev/sda2 /home ext4 rw,relatime 0 0
sudo ls -1Ra /home
has a large output that is beyond the character limit of the terminal (I can only a see a truncated version, with several lost blocks from the early part). Here is a sample:
/home/lost+found/#10862597:
total 368
drwxrwxr-x 5 tom tom 4096 May 12 11:22 .
drwx------ 639 root root 53248 May 9 15:57 ..
-rw-rw-r-- 1 tom tom 2406 May 12 11:22 archive.py
-rw-rw-r-- 1 tom tom 32277 May 12 11:22 asyn.py
-rw-rw-r-- 1 tom tom 26395 May 12 11:22 caching.py
-rw-rw-r-- 1 tom tom 6358 May 12 11:22 callbacks.py
-rw-rw-r-- 1 tom tom 4856 May 12 11:22 compression.py
-rw-rw-r-- 1 tom tom 4193 May 12 11:22 config.py
-rw-rw-r-- 1 tom tom 1245 May 12 11:22 conftest.py
-rw-rw-r-- 1 tom tom 21507 May 12 11:22 core.py
-rw-rw-r-- 1 tom tom 2717 May 12 11:22 dircache.py
-rw-rw-r-- 1 tom tom 348 May 12 11:22 exceptions.py
-rw-rw-r-- 1 tom tom 10187 May 12 11:22 fuse.py
-rw-rw-r-- 1 tom tom 10211 May 12 11:22 generic.py
-rw-rw-r-- 1 tom tom 13766 May 12 11:22 gui.py
drwxrwxr-x 3 tom tom 4096 May 12 11:22 implementations
-rw-rw-r-- 1 tom tom 1800 May 12 11:22 __init__.py
-rw-rw-r-- 1 tom tom 7879 May 12 11:22 mapping.py
-rw-rw-r-- 1 tom tom 19516 May 12 11:22 parquet.py
drwxrwxr-x 2 tom tom 4096 May 12 11:22 __pycache__
-rw-rw-r-- 1 tom tom 10079 May 12 11:22 registry.py
-rw-rw-r-- 1 tom tom 62483 May 12 11:22 spec.py
drwxrwxr-x 3 tom tom 4096 May 12 11:22 tests
-rw-rw-r-- 1 tom tom 2195 May 12 11:22 transaction.py
-rw-rw-r-- 1 tom tom 17103 May 12 11:22 utils.py
-rw-rw-r-- 1 tom tom 500 May 12 11:22 _version.py
/home
mounted? Do:grep /home /etc/mtab
. Also trysudo ls -lRa /home
orsudo find /home -ls
. Please [edit] your question to add whatever information you get. Do not use Add Comment. – waltinator Sep 24 '23 at 04:36ls
, I can'tcd
into it. – question_quasar Sep 24 '23 at 04:49cd
to/lost+found
, it's a stash for files thatfsck
found floating loose, and reconnected them to the filesystem. They may be incomplete/corrupted. If you're happy with the file (it's complete and un-corrupted), usesudo mv
to put them back where they belong. Investigate withsudo file /lost+found/*
,sudo less /lost+found/*
. – waltinator Sep 24 '23 at 05:11