Skip to content

Commit 89265be

Browse files
bcolesawesomekling
authored andcommitted
Base: Add man pages for null/zero/full character devices
1 parent 45a11ea commit 89265be

File tree

3 files changed

+80
-0
lines changed

3 files changed

+80
-0
lines changed

Base/usr/share/man/man4/full.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## Name
2+
3+
full - always full device
4+
5+
## Description
6+
7+
`/dev/full` is a character device which is always full.
8+
9+
Reading from `/dev/full` returns '\0' bytes and exits with status 0.
10+
11+
Writing to `/dev/full` fails with ENOSPC error.
12+
13+
To create it manually:
14+
15+
```sh
16+
mknod /dev/full c 1 7
17+
chmod 666 /dev/full
18+
```
19+
20+
## Files
21+
22+
* /dev/full
23+
24+
## Examples
25+
26+
```sh
27+
$ head -c 8 /dev/full | hexdump
28+
00 00 00 00 00 00 00 00
29+
```
30+
31+
## See also
32+
33+
* [`null`(4)](../man4/null.md)
34+
* [`zero`(4)](../man4/zero.md)
35+

Base/usr/share/man/man4/null.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Name
2+
3+
null - data sink
4+
5+
## Description
6+
7+
`/dev/null` is a character device file which discards input.
8+
9+
Reading from `/dev/null` returns end of file and exits with status 0.
10+
11+
## Files
12+
13+
* /dev/null
14+
15+
## See also
16+
17+
* [`full`(4)](../man4/full.md)
18+
* [`zero`(4)](../man4/zero.md)
19+

Base/usr/share/man/man4/zero.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## Name
2+
3+
zero - data sink
4+
5+
## Description
6+
7+
`/dev/zero` is a character device file which discards input.
8+
9+
Reading from `/dev/zero` returns '\0' bytes and exits with status 0.
10+
11+
## Files
12+
13+
* /dev/zero
14+
15+
## Examples
16+
17+
```sh
18+
$ head -c 8 /dev/zero | hexdump
19+
00 00 00 00 00 00 00 00
20+
```
21+
22+
## See also
23+
24+
* [`null`(4)](../man4/null.md)
25+
* [`full`(4)](../man4/full.md)
26+

0 commit comments

Comments
 (0)