mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:17:36 +00:00
Base: Write some initial man pages
It ain't much, but it's honest work!
This commit is contained in:
parent
36eea6c04b
commit
fed96f455d
8 changed files with 256 additions and 0 deletions
34
Base/usr/share/man/man1/crash.md
Normal file
34
Base/usr/share/man/man1/crash.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
## Name
|
||||
|
||||
crash - intentionally perform an illegal operation
|
||||
|
||||
## Synopsis
|
||||
|
||||
```**sh
|
||||
$ crash [options]
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
This program is used to test how the Serenity kernel handles
|
||||
userspace crashes, and can be used to simulate many different
|
||||
kinds of crashes.
|
||||
|
||||
## Options
|
||||
|
||||
* `-s`: Perform a segmentation violation by dereferencing an invalid pointer.
|
||||
* `-d`: Perform a division by zero.
|
||||
* `-i`: Execute an illegal CPU instruction.
|
||||
* `-a`: Call `abort()`.
|
||||
* `-m`: Read a pointer from uninitialized memory, then read from it.
|
||||
* `-f`: Read a pointer from memory freed using `free()`, then read from it.
|
||||
* `-M`: Read a pointer from uninitialized memory, then write to it.
|
||||
* `-F`: Read a pointer from memory freed using `free()`, then write to it.
|
||||
* `-r`: Write to read-only memory.
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
$ crash -F
|
||||
Shell: crash(33) exitied due to signal "Segmentation violation"
|
||||
```
|
19
Base/usr/share/man/man1/echo.md
Normal file
19
Base/usr/share/man/man1/echo.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
## Name
|
||||
|
||||
echo - print the given text
|
||||
|
||||
## Synopsis
|
||||
|
||||
`echo text...`
|
||||
|
||||
## Description
|
||||
|
||||
Print the given *text*, which is passed as argv, to the standard output,
|
||||
separating arguments with a space character.
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
$ echo hello friends!
|
||||
hello friends!
|
||||
```
|
46
Base/usr/share/man/man1/man.md
Normal file
46
Base/usr/share/man/man1/man.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
## Name
|
||||
|
||||
man - read manual pages
|
||||
|
||||
## Synopsis
|
||||
|
||||
```**sh
|
||||
$ man page
|
||||
$ man section page
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
`man` finds, loads and displays the so-called manual pages,
|
||||
or man pages for short, from the Serenity manual. You're reading
|
||||
the manual page for `man` program itself right now.
|
||||
|
||||
## Sections
|
||||
|
||||
The Serenity manual is split into the following *sections*, or *chapters*:
|
||||
|
||||
1. Command-line programs
|
||||
2. System calls
|
||||
|
||||
More sections will be added in the future.
|
||||
|
||||
## Examples
|
||||
|
||||
To open documentation for the `echo` command:
|
||||
```sh
|
||||
$ man echo
|
||||
```
|
||||
|
||||
To open the documentation for the `mkdir` command:
|
||||
```sh
|
||||
$ man 1 mkdir
|
||||
```
|
||||
Conversely, to open the documentation about the `mkdir()` syscall:
|
||||
```sh
|
||||
$ man 2 mkdir
|
||||
```
|
||||
|
||||
## Files
|
||||
|
||||
`man` looks for man pages under `/usr/share/man`. For example,
|
||||
this man page should be located at `/usr/share/man/man1/man.md`.
|
28
Base/usr/share/man/man1/md.md
Normal file
28
Base/usr/share/man/man1/md.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
## Name
|
||||
|
||||
md - render markdown documents
|
||||
|
||||
## Synposis
|
||||
|
||||
```**sh
|
||||
$ md [--html] [input-file.md]
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
Read a Markdown document and render it using either terminal
|
||||
escape sequences (the default) or HTML. If a file name is given,
|
||||
`md` reads the document from that file; by default it reads its
|
||||
standard input.
|
||||
|
||||
## Options
|
||||
|
||||
* `--html`: Render the document into HTML.
|
||||
|
||||
## Examples
|
||||
|
||||
Here's how you can render this man page into HTML:
|
||||
|
||||
```sh
|
||||
$ md --html /usr/share/man/man1/md.md
|
||||
```
|
19
Base/usr/share/man/man1/mkdir.md
Normal file
19
Base/usr/share/man/man1/mkdir.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
## Name
|
||||
|
||||
mkdir - create a directory
|
||||
|
||||
## Synopsis
|
||||
|
||||
```**sh
|
||||
$ mkdir path
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
Create a new empty directory at the given *path*.
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
$ mkdir /tmp/foo
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue