mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-20 22:50:52 +00:00
Update cheatsheets
This commit is contained in:
34
tldr/linux/lid.idutils
Normal file
34
tldr/linux/lid.idutils
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# lid
|
||||
|
||||
> Query an ID database for tokens matching a pattern.
|
||||
> Note: An ID database must first be built using `mkid`.
|
||||
> More information: <https://www.gnu.org/software/idutils/manual/html_node/lid-invocation.html>.
|
||||
|
||||
- List all tokens and their file locations in the ID database:
|
||||
|
||||
`lid`
|
||||
|
||||
- Find files containing a specific token:
|
||||
|
||||
`lid {{token}}`
|
||||
|
||||
- Find tokens matching a pattern, ignoring case:
|
||||
|
||||
`lid {{[-i|--ignore-case]}} {{token}}`
|
||||
|
||||
- Find tokens matching an extended regular expression:
|
||||
|
||||
`lid {{[-r|--regexp]}} "{{pattern}}"`
|
||||
|
||||
- Output matching lines in grep-style format:
|
||||
|
||||
`lid {{[-R|--result]}} grep {{token}}`
|
||||
|
||||
- Find tokens that appear only once (useful for finding unused definitions):
|
||||
|
||||
`lid {{[-F|--frequency]}} 1`
|
||||
33
tldr/linux/mkid
Normal file
33
tldr/linux/mkid
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# mkid
|
||||
|
||||
> Build an ID database for use with `lid` and other idutils tools.
|
||||
> More information: <https://www.gnu.org/software/idutils/manual/html_node/mkid-invocation.html>.
|
||||
|
||||
- Build an ID database for the current directory:
|
||||
|
||||
`mkid`
|
||||
|
||||
- Build an ID database for specific directories:
|
||||
|
||||
`mkid {{path/to/directory1 path/to/directory2 ...}}`
|
||||
|
||||
- Build an ID database and save it to a specific file:
|
||||
|
||||
`mkid {{[-o|--output]}} {{path/to/database.id}}`
|
||||
|
||||
- Include only specific languages:
|
||||
|
||||
`mkid {{[-i|--include]}} "{{language1 language2 ...}}"`
|
||||
|
||||
- Exclude specific directories from indexing:
|
||||
|
||||
`mkid {{[-p|--prune]}} {{path/to/excluded_directory}}`
|
||||
|
||||
- Display statistics after building the database:
|
||||
|
||||
`mkid {{[-s|--statistics]}}`
|
||||
Reference in New Issue
Block a user