bash-hackers-wiki/docs/dict/file.md

23 lines
671 B
Markdown
Raw Normal View History

2023-07-05 11:06:16 +02:00
# File
A file is a pool of data in the `filesystem`. On
userlevel, it's referenced using a name, a
[hardlink](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
1) then the space allocated for that file is re-used, unless it's still
2023-07-05 11:06:16 +02:00
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
in the `inode`.
2023-07-05 11:06:16 +02:00
Strictly spoken, a [hardlink](hardlink.md) (also called
\"filename\") points to the `inode` which organizes a
2023-07-05 11:06:16 +02:00
file, not to the file itself.
## See also
- [filetimes](filetimes.md)
- [hardlink](hardlink.md)