2023-07-05 11:06:16 +02:00
|
|
|
# File
|
|
|
|
|
2024-01-29 02:01:50 +01:00
|
|
|
A file is a pool of data in the [filesystem](../dict/terms/filesystem.md). On
|
2023-07-05 11:06:16 +02:00
|
|
|
userlevel, it\'s referenced using a name, a
|
2024-01-29 02:01:50 +01:00
|
|
|
[hardlink](../dict/terms/hardlink.md) to the file.
|
2023-07-05 11:06:16 +02:00
|
|
|
|
|
|
|
If a file is not referenced anymore (number of hardlinks to it drops to
|
|
|
|
0) then the space allocated for that file is re-used, unless it\'s still
|
|
|
|
used by some process.
|
|
|
|
|
|
|
|
The file-data splits into actual payload (file contents) and some
|
|
|
|
metadata like filesize, filemode or timestamps. The metadata is stored
|
2024-01-29 02:01:50 +01:00
|
|
|
in the [inode](../dict/terms/inode.md).
|
2023-07-05 11:06:16 +02:00
|
|
|
|
2024-01-29 02:01:50 +01:00
|
|
|
Strictly spoken, a [hardlink](../dict/terms/hardlink.md) (also called
|
|
|
|
\"filename\") points to the [inode](../dict/terms/inode.md) which organizes a
|
2023-07-05 11:06:16 +02:00
|
|
|
file, not to the file itself.
|
|
|
|
|
|
|
|
## See also
|
|
|
|
|
2024-01-29 02:01:50 +01:00
|
|
|
- [filesystem](../dict/terms/filesystem.md)
|
|
|
|
- [filetimes](../dict/terms/filetimes.md)
|
|
|
|
- [hardlink](../dict/terms/hardlink.md)
|
|
|
|
- [inode](../dict/terms/inode.md)
|