bash-hackers-wiki/docs/dict/file.md
Hanson Char e966036f05 Fix hyperlinks of markdown pages at depth 2
find docs/ -depth 2  -name '*.md' | xargs grep '(.*/' -l | \
  xargs -I{} \
  sed -i '' \
  -e 's%(/\([^/#).][^/#).]*\)/\([^/#).][^/#).]*\)\(.md\)\{0\})%(../\1/\2.md)%g' \
  -e 's%(/\([^/#).][^/#).]*\)/\([^/#).][^/#).]*\)#\([0-9a-zA-Z_-][0-9a-zA-Z_-]*\))%(../\1/\2.md#\3)%g' \
  -e 's%(/\([^/#).][^/#).]*\)/\([^/#).][^/#).]*\)/\([^/#).][^/#).]*\)\(.md\)\{0\})%(../\1/\2/\3.md)%g' \
  -e 's%(/\([^/#).][^/#).]*\)/\([^/#).][^/#).]*\)/\([^/#).][^/#).]*\)#\([0-9a-zA-Z_-][0-9a-zA-Z_-]*\))%(../\1/\2/\3.md#\4)%g' \
  -e 's%](\([^:.>)#][^:.>)#]*\))%](../\1.md)%g' \
  -e 's%](\([^:.>)#][^:.>)#]*\)#\([^:.>)#][^:.>)#]*\))%](../\1.md#\2)%g' \
  {}

Related to https://github.com/flokoe/bash-hackers-wiki/issues/10
2024-01-28 17:26:10 -08:00

888 B

File

A file is a pool of data in the filesystem. On userlevel, it's referenced using a name, a hardlink to the file.

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 in the inode.

Strictly spoken, a hardlink (also called "filename") points to the inode which organizes a file, not to the file itself.

See also