mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-08 02:45:53 +00:00
Update cheatsheets
This commit is contained in:
26
tldr/linux/portageq
Normal file
26
tldr/linux/portageq
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# portageq
|
||||
|
||||
> Query for information about Portage, the Gentoo Linux package manager.
|
||||
> Queryable Portage-specific environment variables are listed in `/var/db/repos/gentoo/profiles/info_vars`.
|
||||
> More information: <https://wiki.gentoo.org/wiki/Portageq>.
|
||||
|
||||
- Display the value of a Portage-specific environment variable:
|
||||
|
||||
`portageq envvar {{variable}}`
|
||||
|
||||
- Display a detailed list of repositories configured with Portage:
|
||||
|
||||
`portageq repos_config /`
|
||||
|
||||
- Display a list of repositories sorted by priority (highest first):
|
||||
|
||||
`portageq get_repos /`
|
||||
|
||||
- Display a specific piece of metadata about an atom (i.e. package name including the version):
|
||||
|
||||
`portageq metadata / {{ebuild|porttree|binary|...}} {{category}}/{{package}} {{BDEPEND|DEFINED_PHASES|DEPEND|...}}`
|
||||
@@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Change `stdin` buffer size to 512 KiB:
|
||||
|
||||
`stdbuf --input={{512K}} {{command}}`
|
||||
`stdbuf --input=512K {{command}}`
|
||||
|
||||
- Change `stdout` buffer to line-buffered:
|
||||
|
||||
`stdbuf --output={{L}} {{command}}`
|
||||
`stdbuf --output=L {{command}}`
|
||||
|
||||
- Change `stderr` buffer to unbuffered:
|
||||
|
||||
`stdbuf --error={{0}} {{command}}`
|
||||
`stdbuf --error=0 {{command}}`
|
||||
|
||||
@@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Set a size of 10 GB to an existing file, or create a new file with the specified size:
|
||||
|
||||
`truncate --size {{10G}} {{filename}}`
|
||||
`truncate --size 10G {{path/to/file}}`
|
||||
|
||||
- Extend the file size by 50 MiB, fill with holes (which reads as zero bytes):
|
||||
|
||||
`truncate --size +{{50M}} {{filename}}`
|
||||
`truncate --size +50M {{path/to/file}}`
|
||||
|
||||
- Shrink the file by 2 GiB, by removing data from the end of file:
|
||||
|
||||
`truncate --size -{{2G}} {{filename}}`
|
||||
`truncate --size -2G {{path/to/file}}`
|
||||
|
||||
- Empty the file's content:
|
||||
|
||||
`truncate --size 0 {{filename}}`
|
||||
`truncate --size 0 {{path/to/file}}`
|
||||
|
||||
- Empty the file's content, but do not create the file if it does not exist:
|
||||
|
||||
`truncate --no-create --size 0 {{filename}}`
|
||||
`truncate --no-create --size 0 {{path/to/file}}`
|
||||
|
||||
Reference in New Issue
Block a user