find-maint: The File System Is Being Modified
4.5 The File System Is Being Modified
=====================================
The filesystem gets modified while you are traversing it. For, example,
it's normal for files to get deleted while 'find' is traversing a
directory. Issuing an error message seems helpful when a file is
deleted from the one directory you are interested in, but if 'find' is
searching 15000 directories, such a message becomes less helpful.
Bear in mind also that it is possible for the directory 'find' is
searching to be concurrently moved elsewhere in the file system, and
that the directory in which 'find' was started could be deleted.
Henry Spencer's sixth commandment is also apposite here:
If a function be advertised to return an error code in the event of
difficulties, thou shalt check for that code, yea, even though the
checks triple the size of thy code and produce aches in thy typing
fingers, for if thou thinkest "it cannot happen to me", the gods
shall surely punish thee for thy arrogance.
There are a lot of files out there. They come in all dates and
sizes. There is a condition out there in the real world to exercise
every bit of the code base. So we try to test that code base before
someone falls over a bug.