Update cheatsheets

This commit is contained in:
ivuorinen
2025-12-09 00:21:17 +00:00
parent 4bbaaf8836
commit e9c1654811
29 changed files with 76 additions and 28 deletions

View File

@@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git
- Create a device file with default SELinux security context:
`sudo mknod {{[-Z |--context=]}}{{path/to/device_file}} {{type}} {{major_device_number}} {{minor_device_number}}`
`sudo mknod {{[-Z|--context]}} {{path/to/device_file}} {{type}} {{major_device_number}} {{minor_device_number}}`

View File

@@ -36,6 +36,6 @@ source: https://github.com/tldr-pages/tldr.git
`nl {{[-w|--number-width]}} {{col_width}} {{path/to/file}}`
- Use a specific string to separate the line numbers from the lines (TAB by default):
- Use a specific string to separate the line numbers from the lines (`TAB` by default):
`nl {{[-s|--number-separator]}} {{separator}} {{path/to/file}}`

18
tldr/linux/pivot_root Normal file
View File

@@ -0,0 +1,18 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# pivot_root
> Change the root filesystem to a new directory and move the current root to a subdirectory of the new root.
> Commonly used during system initialization (e.g., in `initramfs`) to switch from a temporary root to the real root filesystem.
> More information: <https://manned.org/pivot_root.8>.
- Make `/new_root` the new root (`/`) and move current root to a subdirectory of it:
`sudo pivot_root {{path/to/new_root}} {{path/to/new_root/old_root}}`
- Display help:
`pivot_root {{[-h|--help]}}`