Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch_root, tailf, uuidparse, waitpid: add pages #12108

Merged
merged 5 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions pages/linux/switch_root.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# switch_root

> Use a different filesystem as the root of the mount tree.
gutjuri marked this conversation as resolved.
Show resolved Hide resolved
gutjuri marked this conversation as resolved.
Show resolved Hide resolved
> NOTE: switch_root will fail to function if the new root is not the root of a mount. Use bind-mounting as a workaround.
> See also: `chroot`, `mount`.
> More information: <https://manned.org/switch_root.8>.

- Move `/proc`, `/dev`, `/sys` and `/run` to the specified filesystem, use this filesystem as the new root and start the specified init process:

`switch_root {{new_root}} {{/sbin/init}}`

vitorhcl marked this conversation as resolved.
Show resolved Hide resolved
- Display help:

`switch_root -h`
8 changes: 8 additions & 0 deletions pages/linux/tailf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# tailf

> This command is superseded by `tail -f`.
> More information: <https://manned.org/tailf.1>.

- View documentation for the recommended replacement:

`tldr tail`
33 changes: 33 additions & 0 deletions pages/linux/uuidparse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# uuidparse

> Parse universally unique identifiers.
gutjuri marked this conversation as resolved.
Show resolved Hide resolved
> See also: `uuidgen`.
> More information: <https://manned.org/uuidparse.1>.

- Parse the specified UUIDs, use a tabular output format:

`uuidparse {{uuid1 uuid2 ...}}`

- Parse UUIDs from `stdin`:

`{{command}} | uuidparse`

- Use the JSON output format:

`uuidparse --json {{uuid1 uuid2 ...}}`

- Do not print a header line:

`uuidparse --noheadings {{uuid1 uuid2 ...}}`

- Use the raw output format:

`uuidparse --raw {{uuid1 uuid2 ...}}`
gutjuri marked this conversation as resolved.
Show resolved Hide resolved

- Specify which of the four output columns to print:

`uuidparse --output {{UUID,VARIANT,TYPE,TIME}}`

- Display help:

`uuidparse -h`
25 changes: 25 additions & 0 deletions pages/linux/waitpid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# waitpid

> Wait for the termination of arbitrary processes.
gutjuri marked this conversation as resolved.
Show resolved Hide resolved
> See also: `wait`.
> More information: <https://manned.org/waitpid.1>.

- Sleep until all processes whose PIDs have been specified have exited:

`waitpid {{pid1 pid2 ...}}`

- Sleep for at most `n` seconds:

`waitpid --timeout {{n}} {{pid1 pid2 ...}}`

- Do not error if specified PIDs have already exited:

`waitpid --exited {{pid1 pid2 ...}}`

- Sleep until `n` of the specified processes have exited:

`waitpid --count {{n}} {{pid1 pid2 ...}}`

- Display help:

`waitpid -h`