Beware of NTFS drives shared with Windows!

Before I get myself into more trouble I found a FreeTube video saying to use this command to fix all my lost+found problems .....

sudo fsck /dev/sdx -y

Is this correct it is supposed to repair all the files and folders ..... this is all he said about the process ..... actually he didn't talk at all just typed the command above and said it would fix everything in one step ....

If the command is correct do I have to do anything with the files and folders in the lost+found folder or will fsck take care of it for me ..... do I delete them ..... move them or something else ????? .....

I do know to back up the drive .... before issuing the command .... using my Rescuezilla .... will this remove the lost+found folder or will that just stay where it is ????? ....

Thanks for any help .....

From FreeTube ......

Well just an update if anyone is interested ..... couldn't find an answer to my above question and as I'm to chicken to try it on my own .... I completely wiped both drives and did a fresh install of both Zorin 17 and Mint on their separate internal drives .....

So far the lost+found folder has not shown up on either drive .... I did not use a saved back-up but reinstalled all my programs etc. from scratch ....

I do have an external drive with pictures ..... files ..... documents and more on it but I'm a little reluctant to plug it in for fear the lost+found folder will show back up .....

Anyway I did do a separate back-up of both OS's after I reinstalled all my goodies and customization's so we'll see what happens .....

I checked both drives with gParted and also the back-up external drives I did with Rescuezilla and no sign of anything with 32 GB on it like before ..... so here's hoping ....

I want to thank everyone who answered my post or read about my journey with the lost+found folder and files .....

Thank you

The command includes a placeholder for the drive. The sdX denotes the placeholder. It may be sda or sdb or if using nVME, sudo fsck /dev/nvme0101 for example; which is for the first partition on the nVME SDD.

Never run fsck on a mounted drive.
This can not only damage files, but can even cause physical damage to the drive.
Don't do it.

The fsck process will not remove the Lost & Found directory for you. In fact, the opposite. The Lost & Found directory is put in place by fsck for its use. fsck places orphaned files or folder in this directory. This can include fragmented files.
This is important because fsck is run in order to repair the FileSystem. Removing these files may result in lost data or a need to run fsck again. Only do this if you are planning to wipe the drive once finished.
You can remove the contents of the directory with

sudo rm -rf /lost+found/*

You can remove the entire directory with

sudo rm -rf /lost+found

Also note, the ext2, ext3 or ext4 filesystems will create the Lost & Found directory, meaning you may see it on USB drives that never had a Unix-like or GnuLinux distro installed to them, but were formatted on GnuLinux. For these, you may need to change the mounting of the USB stick to alter the folders such as removing the Lost & Found directory.
Yes, reformatting it using NTFS or FAT will wipe that directory, but using your sudo elevated permissions will also work though I strongly advise against ever doing so unless you are reformatting that drive right after. Which means - there is no point. If you format it using an EXT FS, it will be recreated new; if you format it in FAT or NTFS, it will be removed anyway.

1 Like

Thank you sir for an informative and detailed explanation of using fsck for the lost+found folder ..... I know there is lot more to fsck commands but I didn't really need those and you kept it simple and straight foeward for my needs .....

Not sure just what I am going to do about lost+found ..... 30 GB is not really a deal breaker for me as both my drives are far from being filled up ..... I have Mint .... which I use as my daily driver ..... on the 256 SSD drive and Zorin 17.1 on the 1 TB drive which I entend to use for all the video's .... photos ..... downloads ..... documents and Steam games .....

Both OS's have Cinnamon DE installed and are identical in their customization as well as basic programs .... it is very easy for me to switch between either one by restart or shut down as they both are on the grub menu .....

I could also do like you said above and use either of these two commands followed by formatting the drive and then fresh install ......

You can remove the contents of the directory with

sudo rm -rf /lost+found/*

You can remove the entire directory with

sudo rm -rf /lost+found

I thought that lost+found had dissapeared from both systems but apparently it did not just moved to a different location ...... from Devices to File System ...... which caused me to think that when I formatted both drives and then did a fresh install of both systems ..... I had solved the problem ...... but apparently not ..... as the photo below will show ......

What do you suggest ?????? ..... I don't really mind formatting and reinstalling a fresh copy of both systems as I have less than 100 GB on either drive and I have a lot of vital files etc backed up on a thumb drive formatted in NTFS ..... after all I have already done this twice .......it is no big deal ......

I can't format either drive to NFTS because anything I do with Rezcuezilla will only be returned to EXT4 as Rescuezilla is basd on Linux and uses gParted to wipe your drive before making a back-up .... which is probably a good thing ...... the same thing with the Recover feature it takes the image from the drive you sellect ...... it then formats a different drive you choose putting the image on it ....

As both drives that I had formated and reinstalled the OS's on before had the lost+found folder still on them ..... i believe if I choose those images I will just be putting that folder on the newly formated drives with the fresh installed OS's ...... so those 2 back-ups to me are worthless and I can just delete and format theose drives ..... get them ready for the new back-ups after I have purged lost+found ..... formated them and do the fresh install of Zorin and Mint .....

Hope to can read and undestand all this as my spell checker has deserted me for some reason ......

You can remove the folder with the terminal commands- However if they are needed, the system will recreate the directory and replace the markers for the known orphaned files if done on an existing system.
The directory will be created fresh (So, empty) on a new format and install - so it will be present but take up less space.

All of this said, 30 gigs is a lot of space.
I just ran

sudo ls -lh /lost+found

on my computer and the resultant output was

0

That you have so many files redirected in your Lost & Found folder suggests that your hard drive is experiencing some troubles... I would consider this a significant warning sign, if it was me.
This does not mean that your hard drive is failing. It means test using S.M.A.R.T. or other for bad sectors or blocks. Remember, ext4 is a journaling file system (which is why it does not need to be defragged) so it will move blocks of data as needed to avoid bad areas of the drive automatically.
For 30 gigabytes, this suggests this has happened a lot - and left a lot of orphans.
However, it is also possible that errant installs and removals have caused this, along with not performing sudo apt clean && sudo apt autoremove as regular maintenance.
You can also use fsck on the drive while it is unmounted to check and correct errors in the hopes it may reduce the contents of Lost & Found.

Interesting ..... just ran the same thing and mine was 0 also .....

What does this mean ??????

I hate to say it but I really can't remember when I have used that command ..... I did just use it now but it didn't show anything ....

I'm back had some time on my hands yesterday so I did a removal of the lost+found using both of the commands below ..... might be a bit overkill .....

sudo rm -rf /lost+found/*

sudo rm -rf /lost+found

Formatted my Mint OS drive as it is a lot faster and only 256 GB SSD ..... formatted it from my Zorin 17.1 drive and did a fresh install of Mint Wilma ......

I reinstall from scratch all my programs etc. and this is what I now show on my drive ......

The lost+found has now moved from my Devices to File System ......

The folder appears to be empty ....

![Screenshot from 2024-09-06 08-55-00|690x388]
(upload://Aa6ftHUJ6wicCjS52cTMGXCkWnT.png)

As for the condition of my 256 GB SSD Drive I did a S.M.A.R.T test and it shows this .....

What else should I do ..... I haven't started on my Zorin 17.1 OS drive yet .... just taking a short break for now and am going to Back-up my Mint drive today with Rescuezilla before something else happens .....

I do not see anything in your smartctl report that should have you very nervous. Looks like there are some bad sectors, but nothing catastrophic.

The Lost & Found directory will always be automatically created, even if left empty.

1 Like

Thank you kind sir for all your help .... in a couple of days I will format and install Zorin 17.1 fresh and I expect the same results ..... I'll also check the 1 TB drive with smartcti and hopefully it will be fine also .....

Just curious when should I use the ..... sudo apt clean && sudo apt autoremove ..... command so I don't make this mistake again .....

Again thanks .....

Once a week would be more than enough. Since I do all installs or apt searches or what have you in terminal, I see notification of a need for apt cleaning often... But for other users, if they just make a point to run Ubuntu Cleaner or cleaning through terminal once a week when they perform their regular back ups, that will help save them from headaches.

1 Like

Oh OK ..... I use Ubuntu Cleaner quite often usually right after I have an OS download ..... but I am careful to keep 1-2 kernels just in case I need something to fall back on ..... I also keep a folder with a list of all the system updates and another folder of the Ubuntu Cleaner's that I have made .....

Just reinstalled Zorin 17 Os on my 1 TB drive with no problems and the lost+found folder was there but empty .... will do the drive testing later along with a new back-up .....

1 Like

I wonder if I misunderstood your description. The lost & found directory reappearing and filled to 60 gigs would be a little concerning.
But it sounds like it is empty now and that you are well on top of things.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.