File corpse

from Wikipedia, the free encyclopedia

A file corpse (not to be confused with a card file corpus ) is a slang term from computer science that generally refers to a file or its remains that are no longer used and unnecessarily take up storage space on a data carrier . More precisely, the term is used for two different things:

  • Clusters of a file whose directory entry no longer exists, which therefore no longer belongs to any file, but is still considered occupied
  • Temporary files that are no longer needed but have not been deleted

In both cases, the cause is an unintended state during program processing. In the first case, the operating system is disrupted when a system call is made to edit files (e.g. delete or move ); in the second case, the external program ( application ) that uses the temporary file is disrupted. The disturbances can e.g. B. by turning off the computer, abort by the user, power outages , damaged data carriers, pulling out the data carrier or programming errors.

Explanation and examples

A file in the widely used FAT file system consists of three elements: the occupied clusters (logical unit made up of several sectors) that contain the actual data, the FAT entries that describe where these clusters are in which order, and the directory entry that specifies that the file even exists, where it starts and contains the metadata such as name or size. The operating system uses the FAT to recognize which sectors are free and where clusters of a file are located. If there are no more free clusters, the data carrier is full. Which file the cluster owns, however, is stated in the directory entry, so it is not easily possible to infer the file that owns it from a FAT entry. If a file is deleted, the directory entry is marked as invalid and all clusters occupied by it are released. If the deletion process is canceled after the directory entry has been removed, but not all clusters have been marked as free, the clusters remain occupied even though the file has been deleted. So they can no longer be used, but it is no longer known what they belonged to. This makes the data carrier appear “full” than it actually is.

If a program uses temporary files , it should actually delete them as soon as they are no longer needed (similar to sticky notes that are kept for a short time and thrown away immediately after the topics on them are dealt with to keep the desk tidy). If this is not done, however, these useless files “litter” the data carrier.

remedy

Temporary files that are no longer required can be deleted by the user without any problems. As a rule, however, the problem for the user is the lack of knowledge that they exist at all.

Lost clusters require a program that tracks cluster chains and marks clusters that do not belong to any file as free (bypassing the operating system).

See also