What is the purpose of the lost+found folder in Linux and Unix? (2014)

Posted by tosh 5 days ago

Counter232Comment88OpenOriginal

Comments

Comment by pmontra 2 days ago

I had a lost+found folder in all Unix file systems I used since the 80s. It's where fsck places files that it found during a scan and can't figure out to which directory they belong. Sometimes I found stuff in there.

From what I googled XFS, Btrfs and ZFS don't use lost+found. It's a thing of the old not journaled filesystems and of the ext family.

Comment by Eikon 2 days ago

Even with journaling, you might need one. ZeroFS [0] almost had a lost+found directory (even with the WAL enabled), because you might have consistency issues between your in-memory state and what was flushed, and especially in what order.

ZeroFS ended up not needing recovery at all through atomic, strictly ordered commits [1], but it was far from trivial (and not just a matter of requiring a WAL).

[0] https://github.com/Barre/ZeroFS

[1] https://github.com/Barre/ZeroFS/blob/main/zerofs/src/fs/writ...

Comment by jcalvinowens 2 days ago

XFS does use /lost+found, it calls it the "orphanage directory" and xfs_repair reparents children of corrupt directories there.

Based on comments in the kernel source, it seems like the userspace fsck for JFS and F2FS will also sometimes create /lost+found. There might be more that do.

Comment by adrian_b 2 days ago

XFS filesystems do not have a "/lost+found" directory in their normal state.

In the very rare occasions when one has to run "xfs_repair", it will create a "/lost+found" directory, if it is required for recovered files.

After the repair and after investigating whether the recovered files contain useful data or not (and after moving the useful files elsewhere), one should normally delete the "/lost+found" directory, because it is no longer needed.

Comment by Tsiklon 2 days ago

XFS as implemented in RHEL8+ (the only places i've used it in anger) tends to handle being full very badly, leading to system lockups and blocked tasks necessitating a hard reboot. Worse yet is when it's in this state the journal fills and nothing can be done with the volume.

To recover from this on a volume mounted at boot mandates going to either a live disk, or stopping boot in initramfs and running xfs_repair there, I've fruitlessly attempted to play back the journal on many separate occasions by attempting to mount the filesystem (again causing a lock up due to no space) in that state you have to drop the journal, run xfs_repair and then clean up the detritus from /lost+found (and then the location that caused the disk to fill altogether).

EXT4 has other issues certainly, but at least it reserves blocks for the root user explicitly so the system doesn't stop.

Comment by bityard 1 day ago

You are going to have a bad time when your / filesystem fills up, regardless of the filesystem type. This is one of the reasons for separate /usr, /var, /home, etc that many seem to have forgotten. Smaller blast radius when there is a problem.

The reserved space in ext4 doesn't do you any good if root is the user that filled up the disk in the first place, which is far and away the most common thing I see.

Comment by trumpdong 1 day ago

On ext4 things will start failing with -ENOSPC but recovery is as simple as deleting files that are taking up space - which may or may not require a reboot into single-user mode depending on how badly the running system is borked - but the filesystem remains intact, you don't have to drop the journal, you don't have to run fsck or any other repair tool. You can just delete files and get the space back.

Comment by ericbarrett 1 day ago

This is true of XFS too; I have run it in production on both RedHat and Debian/Ubuntu based distros for decades and have never had issues after an FS full event. I usually reboot a server that has had the root FS full because sometimes service logging will not recover from write failures, but I've never had to xfs_repair.

Comment by wongarsu 1 day ago

On servers I've usually had a bad time when / fills up. But using Linux as a desktop with ext4 I regularly fill the file system up (laptop with a too small SSD, so this happens quickly when batch downloading) and nothing bad happened so far. Which is approximately the same experience I have on Windows

Comment by esseph 2 days ago

XFS tip:

If you truncate a file it doesn't update metadata. That's how you can get back space for the journal log to start cleaning up crap without rebooting the box and/or taking services down.

Comment by hdgvhicv 2 days ago

My initialisation script creates five 100M files in /root (which is on /) to give something to manually delete for breathing room.

Comment by Tsiklon 2 days ago

Thank you, I’ll keep this in my hat for the next time.

Comment by sigio 1 day ago

Don't know if this is a regression from before, since in the RHEL 5/6 days I used XFS filesystems as my default filesystem on large storage-pools. Since XFS doesn't have a shrink option, I would create filesystems of a few gigabytes in size, and grow them whenever needed. I mostly used them for monthly archiving of uploads to a customer's website, so there would be a YYYY-MM lvm volume with an XFS filesystem, and during the month it would be grown automatically from a cronjob if space got tight. I'm quite sure I must have had a bunch of full filesystems there, and never ran into any crashing issues with full XFS filesystems (though these were not the 'root' filesystem). But even on my current laptop (with debian 12/13) I'm running XFS on all filesystems (besides /boot and /efi), and they report being full often enough without any crashes/reboots.

Comment by adrian_b 2 days ago

The last time when I have used RHEL was decades ago, so I do not have any idea about what happens there.

On the other hand, I have been using XFS since 2005 (since when I have transitioned from 32-bit Linux to 64-bit Linux), on a great variety of hardware systems, servers, desktops, mini-PCs, laptops.

My file systems are typically mostly full and from time to time I had incidents when some job failed by filling completely the file system and no longer having any space left for writing the remainder of the files being written.

Filling completely the HDD or SSD has never caused any problems. I have always just deleted some files or moved some files to other file systems, and I have continued working. Sometimes I had some downloading in progress, which was halted by the browser because of full disk, and in such cases, after making space, I just resumed the download in the browser.

So I am puzzled by your experience, but I am not very surprised because in Linux there are many obscure configuration options, so the behavior can vary a lot between distributions (I typically use Gentoo). Perhaps your problems were caused by certain daemons that were continuing to make write attempts in the background, which I do not have.

The only problems that I have ever encountered in XFS happened only in early XFS, i.e. 2 decades ago, which was extremely sensitive to power failures, despite being a journaled filesystem. In early XFS, after a power failure, some previously open files were erased, even if they had been open only for reading. Because of this, a power failure frequently bricked the system, by erasing "/etc/fstab".

However, this stupid XFS feature has been corrected many years ago and nowadays power failures normally do not have any effect on XFS, i.e. xfs_repair is normally not needed, even after power failures. That was a bug at the conceptual level, not at the programming level, because the erasure of some files in early XFS was intentional, because it wrongly concluded that they might have been corrupted.

While early XFS was notorious for its fragility against power failures, at that time none of the competing file systems was significantly better, all were buggy. Around the same time, more than two decades ago, I have seen a lot of other filesystems corrupted by power failures, regardless whether they were Windows NTFS or Linux EXT3 or JFS, despite the fact that all were advertised as being resistant to power failures by being journaled. At that time, only one filesystem was completely impervious to power failures, and it was non-journaled, the FreeBSD UFS with "soft updates" (i.e. with a careful ordering of the disk writes, to maintain a consistent state across power failures).

Comment by JdeBP 2 days ago

I have a book on my bookshelf, Eric Foxley's Unix for Super-Users. It was published in 1985, and it answers this question on page 52, the first page listed for the entry 'lost+found' in its index.

This is surely not the earliest book mention, is it? (It'll be in earlier man pages, of course.) Google Books does not give me an earlier one, although it does yield another 1985 book.

Fun fact: Foxley cautioned that lost+found must be pre-sized ahead of time, because the fsck of the time did not grow the directory to fit found files.

Comment by valleyer 2 days ago

How do you size a directory? Just by creating entries in it and then unlinking them?

Comment by necheffa 2 days ago

Usually the filesystem driver provides an API call that sets the appropriate data structures so that the directory entry table is preallocated.

The ext-family filesystems provide the mklost+found command to tap into this call if you need to recreate the lost+found directory specifically.

Comment by Taniwha 2 days ago

From memory mklost+found did exactly this

Comment by JdeBP 2 days ago

It did.

Foxley gives the manual procedure for sizing the lost+found directory on the aforementioned page 52.

I have the 1986 edition of Fielder's and Hunter's UNIX System Administration and it does not mention any such command in its discussion of lost+found in chapter 3. It references AT&T Unix System 5 Release 2 (or 'UNIX 5.2' as the book puts it).

But Google Books tells me that their later 1991 update, referencing Release 4 and with an updated title to match, does indeed mention mklost+found. So that looks like something that appeared in Release 3 or 4.

Comment by Taniwha 2 days ago

I used to port Unix for a living (V6 thru SysVr3) I know it was in Vr2, and I have a man page that says "(last mod. 1/15/87)" which would likely make it SysVr1 or earlier

Comment by Taniwha 2 days ago

(My guess is that it dates from the introduction of fsck which from memory was V7 or later)

Comment by JdeBP 1 day ago

My guess is that it was undocumented until Release 3 or 4, so the book authors simply never found out about it. Andrew Tanenbaum knew about it at the same time as the first Hunter and Fielding book, but likely this was word-of-mouth stuff.

* https://groups.google.com/g/comp.unix.wizards/c/bbCYhh7_r-8/...

Enjoy the obvious question asked about all this, way back in November 1981:

* https://groups.google.com/g/fa.unix-wizards/c/h5mFGIV91Io/m/...

That's the Dave Yost, still at RAND at the time, who went on to make the GRAND Editor.

* https://news.ycombinator.com/item?id=43734536

Comment by mesrik 2 days ago

Foxleys book does not actually claim reason why it need to be preallocated. I've got the book also. Index mentions fsck only page 52, where it reads:

  "52 UNIX FOR SUPER-USERS
  ...
  The filestore consistency check is performed by the command fsck (usu-
  ally stored as /etc/fsck, but sometimes in /bin), which should be used to check
  all discs used as file-systems. It defaults to the list of filestore devices given
  in the file /etc/checklist. At this stage, most of the file-systems will not be
  mounted, so will be inactive; only the root file-system will be active. The
  fsck command goes through each one in turn, reports any inconsistencies in
  them, and offers to correct them. The reply to each query is either 'y' for yes
  (correct the inconsistency), or 'n' for no (leave the file-system inconsistent).
  A parameter '-y' to the command assumes 'yes' replies to all questions, so
  that no further interaction is necessary; a parameter '-n' similarly assumes
  all 'no' answers, and therefore needs no write permission to the device. Any
  'yes' reply may involve the loss of information, such as the complete removal
  of a suspect file. Suspect files on the file-system being checked are written to
  a directory lost + found on the device if such a directory exists; this directory
  must have been created, and be sufficiently large already to hold the names
  of all the files involved. This can be ensured by first creating the directory,
  then creating a number of files in the directory, and then removing them.
  The corrected systems will be consistent, and can later be mounted as and
  when required. It may be possible to recover information from deleted files
  by looking at the lost + found directory. There should be a lost + found direc-
  tory at the head of each mountable file-system.
  When checking the root file-system, there are complications, in that it
  will be active (even though, because it is root, it will not be formally mounted
  as such, but is implicitly mounted as root during the booting process). If
  modifications are necessary, they should be completed, and the machine
  rebooted without first performing a sync (see section 4.5 below for the nor-
  mal procedure for taking a system down). This is to ensure that the disc as
  modified by fsck is not overwritten by any in-core information, which may
  have been generated from information read from the original corrupt (incon-
  sistent) version.
  ...
  "
But I've also read more detailed explanation that recollect is that unless blocks were preallocated, there was a possibility that lost+found need first allocate more blocks directory it already had, it would possibly led to losing some data that would otherwise been able to recover once fsck had advanced further from that point.

Old time UNIX systems directories were just another structured file, which a 'd' bit (like others you changed with chmod) on them, where each record was 16 bytes, which 2 first were the inode number followed by 14 bytes reserved for filename. IIRC linux also had first same limit first filesystems. You could read directory with any program, common feat was to check any odd stuff that "ls" would not show with could hexdump or "od" with some flags and print 16 bytes lines per row. That way you also could see any deleted or moved files from that directory, because directory entry was not quite long otherwise cleared but just clearing that inode reference two bytes.

A Quick look from other books that I have close me now Maurice J. Bach, The Design of Operating UNIX System (-86) contains much more about fsck and filesystem fixing issues scattered few pages in the book and what methods were used to mitigate loss of data. S.R Bourne The Unix System, no mention of fsck at all, at least by looking book automatically generated index.

It could have been some other quite old book I did read, but did not own or anything since BSD4.3-tahoe documentation I've read over the years. But sure it would be nice to read that exact reasoning again from credible sources.

edit: Oh, and you could preallocate also just by adding entries or copying some data to lost+found enough, and then remove entries. Unix traditionally have not compacted and resized directories. They only grow and can be if have been very large slow to traverse. The way to compact is creating another, moving existing data there and then swapping directories.

Comment by mesrik 2 days ago

OK, I found bit more from UNIX System Administration Handbook Third Edition (Evi Nemeth, Garth Snyder, Scott Seebass, Trent R. Hein, with even more authors mentioned) 2001 book following:

  "134 UNIX System Administration Handbook
  ...
  The lost+found directory is automatically created when you build a filesystem. It is 
  used by fsck in emergencies; do not delete it. The lost+found directory has some
  extra space prealocated so that fsck can store "unlinked" files there without having
  to allocate additional directory entries on an unstable filesystem. Some systems pro-
  vide mklost+found command that can recreate this special directory if it is aci- 
  dentally deleted.
  ...
  "

Comment by FerretFred 2 days ago

In a couple of decades running Linux installations of all flavours, I have never seen anything in lost+found!

Comment by pixl97 2 days ago

Yea, run an old kernel with ext2 on a busy system writing a bunch of small files and have a power supply fail and you'll end up with something there.

fsck on large hard drives was scary on how long it could take to finish.

Comment by Sophira 2 days ago

The occassional "Drive has not been checked in <n> days, forcing check" message on bootup got annoying sometimes, yeah. It could easily take tens of minutes to finish, exactly when I wanted to use the computer!

(At least this is what my memory is telling me. I could be mistaken, but that's what I remember.)

Comment by b112 2 days ago

I had a largish raid back then, under ext2, may have been a massive 40G.

I recall going to sleep and it still not being done when I woke up. Bleh.

Comment by wpollock 2 days ago

One of several reasons to partition a large volume into smaller ones. At least, back then.

Comment by coldpie 1 day ago

I always turned this off, and also, cursed myself when I forgot to turn it off.

Comment by jleedev 2 days ago

"check forced", as though the machine is advising me to go look at some daemon named forced.

Comment by nosioptar 2 days ago

Forced sounds like a systemd service for Jedi stuff.

Comment by DonHopkins 2 days ago

These are not the inodes you're fscking for.

Comment by lokar 2 days ago

You need to use worse hardware and bad power :)

Comment by pkaye 2 days ago

I used to develop SSD firmware and one of things I worked on is making it robust to power failure. The power supplies have lots of capacitance so the voltage drop was slow so we would use a special test board that would disconnect from power and discharge fast to test it.

Comment by ExoticPearTree 1 day ago

You would flush the SSD memory to "disk", right?

When you have dirty writes in the kernel that have not yet been written to disk, in the old days of ext2 (before XFS was ported to Linux) if the power would go out, or you would have a bad disk, when fsck.ext2 would run, if files could not be matched to a directory, they would placed in the /lost+found as, and hopefully my memory is intact, as inode numbers, so you would have 1232342343, 123246564 etc and then you would have to look at each file to figure out what it was and where to move it if it was salvageable.

Brought back some memories.

Comment by pkaye 1 day ago

The testing was at the drive level without an OS like ext2. The test was with no flush (with flush test is easy to pass). Without PLP, the pass criteria is that the data that was buffered can be either the older or newer data and not corrupted or previous data. All the other blocks on the SSD should remain unchanged. Its trickier that you think because MLC/TLC NAND could corrupt other blocks due to NAND structure and we had to deal with that. Then you also have to worry about system data in the NAND doesn't get corrupted.

Comment by doublepg23 2 days ago

Thank you for your service!

Comment by lokar 2 days ago

My main experience is with pre-scsi/ide systems :)

Comment by esafak 2 days ago

ESDI?

Comment by lokar 1 day ago

SMD

Comment by marcosdumay 2 days ago

And more concurrent writes.

But I think ext4 will only let things appear there if you change some default flags.

Comment by comboy 2 days ago

Yeah, I think lack of any decent hardware RAID could be a prerequisite.

Comment by FerretFred 2 days ago

Umm .. how about a Raspberry Pi Zero 2W powered by a 2000MaH " lipstick style" powerbank?

Comment by JdeBP 2 days ago

That's what the answers are missing, of course. In some filesystem formats, it's possible either to recover completely from a journal/intent log, or at least to recover everything to the point that recovered files can be placed into the correct directory.

Comment by int0x29 2 days ago

My SD cards have always had stuff in that folder. It scares me. I try not to look

Comment by arendtio 2 days ago

Same here. And I had some pretty f**ed up file systems.

At one point, I had one where the directory structure was completely broken and had circles in it (broken SSD). To be fair, in that particular case, I did not look for lost+found and just wrote a tool to extract the data manually that I was looking for.

Comment by cobbaut 1 day ago

> In a couple of decades running Linux installations of all flavours, I have never seen anything in lost+found!

I saw it often. Running fsck on a crashed/failed partition usually does put some files in there. Maybe I kept using old hardware too long...

Comment by mixmastamyk 2 days ago

Have to run fsck. This used to be forced about once a month but don’t remember it happening in the last decade or so.

Comment by 2 days ago

Comment by 2 days ago

Comment by Schnitz 2 days ago

The lost+found folder saved our backs once way back when. We had a 1TB NAS running Linux, an enormous amount of storage back then. It was shut down unexpectedly and disorderly and ran a multi hour fsck upon reboot. The volume must have had a shot root inode, as after the machine booted and mounted the volume it was empty. All directories were luckily under lost+found with all their contents.

Comment by amelius 2 days ago

Why can't a filesystem create the lost+found folder only when it needs to store files in it?

That would be a much cleaner approach, imho.

Added benefit is that you'd immediately see it if something is wrong with a disk.

Comment by JdeBP 2 days ago

Chicken and egg problem.

On the UFS and suchlike filesystems, at the point that fsck is rescuing orphaned i-nodes, it still has not fully gone through the process of checking and correcting free list information, or indeed fully eliminating errors from the i-node table. Creating a directory involves allocating a new i-node from an unused slot, and free blocks off the free block list.

Ironically, because they are slightly or grossly different to Unix filesystem formats, on HPFS and FAT this is less of an issue. (FAT usually has unused slots in the root directory that it is sane to use at that point, for example.) CHKDSK on OS/2 did create its \FOUND.nnn files on the fly.

Comment by layer8 2 days ago

As the submission explains, the lost+found folder has pre-allocated space for the directory entries. From the mklost+found man page [0]:

       mklost+found pre-allocates disk blocks to the lost+found directory
       so that when e2fsck(8) is being run to recover a file system, it
       does not need to allocate blocks in the file system to store a
       large number of unlinked files.  This ensures that e2fsck will not
       have to allocate data blocks in the file system during recovery.
Pre-allocating space without making the directory visible would require more arcane file system magic.

[0] https://man7.org/linux/man-pages/man8/mklost+found.8.html

Comment by amelius 2 days ago

> Preallocating space without making the directory visible would require more arcane file system magic.

If those filesystem engineers had a manager that said: make this nice for the user, then it would have been done.

But these developers had no managers and were OK eating their own unpalatable dogfood.

Comment by dhosek 2 days ago

You greatly overestimate the capabilities of computers of the era that this originated in. Major limitations of disk space, speed and addressability combined with limited CPU power and RAM mean that your hypothetical, “it could have been done” would require a significant investment in development and runtime resources all to avoid having a directory in root that would be empty until after a post-crash recovery.

Also remember that these systems would have all been multi-user time-sharing systems, not desktop computers.

Comment by amelius 1 day ago

Sorry, but I just don't believe all this. We're talking about hiding a folder. Of course the developers could do that.

Comment by dhosek 1 day ago

well sure, they could have named it .lost+found instead of lost+found, but you’re overestimating the value of hiding it.

Comment by cobbaut 1 day ago

It's at the root level, no user came near that back then so it was kinda hidden.

Comment by 2 days ago

Comment by 2 days ago

Comment by ivlad 2 days ago

Because you need to pre-allocate space and indies for it in case things go wrong and the disk is almost full

Comment by NelsonMinar 2 days ago

We once deleted the lost+found folder on an old Unix system* by accident. Things went very badly the next time the system rebooted, fsck did not handle it at all well.

* Probably DEC Ultrix 2.2, a BSD 4.2 derivative.

Comment by zer0zzz 2 days ago

Back in the day I accidentally deleted all my stuff because I had it all in a special dir of this user in suse Linux. When I deleted the user, yast deleted everything.

Fortunately I was using ReiserFS at the time and something about its murderous tree data structure made it trivial to undelete.

Reiser_fsck found ALL my stuff, mostly with full dir tree structure in tact and put it all in lost+found

Comment by lanycrost 22 hours ago

This is the way journaled filesystems place recovery files.

Comment by robrain 2 days ago

(2012), maybe?

Comment by JdeBP 2 days ago

It is StackExchange. So in theory someone could modernize it at any time.

Comment by robrain 2 days ago

Indeed and I just saw it was edited in 2012 - originally posed in 2011, answers last updated in 2014.

Comment by ciupicri 2 days ago

Yeah, it seems I improved a tiny tiny bit a couple of them.

Comment by trumpdong 1 day ago

No, that would be reverted for "violating the author's intent" if you edited an existing answer, and if you posted a new answer it'd be permanently at the end of the list because it would never attract many votes due to being at the end of the list.

Comment by josephcsible 1 day ago

> No, that would be reverted for "violating the author's intent" if you edited an existing answer

Can you link to an example of when that happened when it shouldn't have?

> if you posted a new answer it'd be permanently at the end of the list because it would never attract many votes due to being at the end of the list.

No it wouldn't. They added a new answer sort called "trending" and made it the default specifically to fix that problem.

Comment by 2 days ago

Comment by jmclnx 2 days ago

lost+found is still used on OpenBSD, seems it is created when needed. Only /home has that directory on my system. IIRC, it was created when a kernel panic happened a few releases ago. Plus some files were placed in it when fsck executed on /home

Comment by SoftTalker 2 days ago

Same, it's only in /home on my system also. Also /home is pretty much the only directory where I see fsck needing to do a lot of recovery after a power failure. Makes sense I guess, because that's where processes such as web browsers are likely to have lots of files open in RW mode.

Comment by anonu 2 days ago

glad to see that Stack Overflow (or stackexchange.com) is still a thing.

Comment by gberger 2 days ago

It's a question from 2011...

Comment by orwin 2 days ago

they offer private instances to school too, where moderation is left to school policy, and mine seems to be good enough to use whenever i have frontend questions (i'm 10 year into my career and still use my juniors to answer my frontend questions, i think i won't ever change)

Comment by shevy-java 2 days ago

I keep everything hidden there.

In reallife I would rename this to "trash".

Comment by 2 days ago

Comment by undebuggable 2 days ago

lost+found is the Thumbs.db and .DS_Store of Linux

Comment by autoexec 2 days ago

More like a FOUND.000 folder or a root directory filled with .CHK files

Comment by mesrik 2 days ago

I've last seen those in older Cisco ASA firewall's up to OS version 8.something which had internal or external CompactFlash with VFAT16 filesystems. Usually caused by end of useful life of that CF or if already replaced by someone who did not quite understand device requirements and what it supports.

Either because did not care or understand 32bit VFAT while it works for while, then when CF usage gets over VFAT16 supported 2GB fs gets corrupted, system fails after a while and then you got plenty of those FOUND.xxx files root of that CF drive after boot ran fsck. Those old ASA's did accept and work with 4GB CF's which were available much longer than 2GB versions, but you needed to make max 2GB VFAT16 primary partition and then format it with Linux mkfs.vfat with flags that made sure it's only 16bit version. Once that was done, you could copy files from old CF using something that copies also hidden files and directories too, which there were few there.

ASA used to be some Cisco proprietary OS and was just rebranded PIX firewall, then from 8 oddly hacked linux with grub boot.

Not much of my favourite box as a firewall, but Remote-access VPN features did work quite well quite long and when clustered it was easy to run upgrades each node at time without DTLS and IPsec clients even noticing it.

Comment by gattilorenz 2 days ago

I was thinking that it’s been a while since I saw those file names… but I guess your username checks out :)

Comment by JdeBP 2 days ago

You can even tell which operating systems xe has used. Both of those are very specific. The \FOUND.nnn directories are something that IBM/Microsoft introduced when they re-did CHKDSK for OS/2, which was what Windows NT inherited. FILEnnnn.CHK in the root directory was the old Microsoft CHKDSK, and also Symantec/Norton SCANDISK, for MS/PC/DR-DOS.

Comment by pixelesque 2 days ago

Not really, as it's only once per file system mount, whereas those Windows and MacOS files are sprinkled in most directories with images and almost every non-network drive directory respectively.

Comment by dhosek 2 days ago

I think it’s more akin to the Recovered Items (or something like that) folder that shows up in your home directory sometimes (but maybe not anymore?)

Comment by account42 1 day ago

rmdir /lost+found is always my first step after creating and mounting a new file system. Reserving a user-visible directory just so that a 0.00001% chance recovery is slightly easier just doesn't make any sense.

Comment by cobbaut 1 day ago

I have recovered files several times after fsck on a failed partition. I may have a 75 percent success rate with this... did not keep statistics obviously.

Though it could be less, cause I also remember recovering files with foremost on a dd copy of a disk.

Comment by account42 1 day ago

You'll still be able to recover files - fsck will just recreate the directory. There is a slight chance that if the free list is fucked that this will loose you a couple of more blocks of data but then you're already well into fubar territory anyway.

Comment by deadbabe 2 days ago

How do questions like this make it to the top? It is an obvious thing if you search for it or ask AI, but people seem to just ignore those in favor of generating new human responses.

Thing is, any time I try to replicate something like that, I basically get a flippant response saying to go look elsewhere.

Comment by yndoendo 2 days ago

Reaching HN or other sites allows for exposure to information that a person otherwise would not ask themselves.

I also respect human responses over AI ones every day that ends in Y.

Comment by Velocifyer 2 days ago

Why not on sundae?