whereis, xar, yank: move to common (#6552)
This commit is contained in:
27
pages/common/whereis.md
Normal file
27
pages/common/whereis.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# whereis
|
||||
|
||||
> Locate the binary, source, and manual page files for a command.
|
||||
|
||||
- Locate binary, source and man pages for ssh:
|
||||
|
||||
`whereis {{ssh}}`
|
||||
|
||||
- Locate binary and man pages for ls:
|
||||
|
||||
`whereis -bm {{ls}}`
|
||||
|
||||
- Locate source of gcc and man pages for Git:
|
||||
|
||||
`whereis -s {{gcc}} -m {{git}}`
|
||||
|
||||
- Locate binaries for gcc in `/usr/bin/` only:
|
||||
|
||||
`whereis -b -B {{/usr/bin/}} -f {{gcc}}`
|
||||
|
||||
- Locate unusual binaries (those that have more or less than one binary on the system):
|
||||
|
||||
`whereis -u *`
|
||||
|
||||
- Locate binaries that have unusual manual entries (binaries that have more or less than one manual installed):
|
||||
|
||||
`whereis -u -m *`
|
15
pages/common/xar.md
Normal file
15
pages/common/xar.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# xar
|
||||
|
||||
> Manage .xar archives.
|
||||
|
||||
- Create a xar archive of all files in a given directory:
|
||||
|
||||
`xar -cf {{archive.xar}} {{path/to/directory}}`
|
||||
|
||||
- List the contents of a given xar archive:
|
||||
|
||||
`xar -tf {{archive.xar}}`
|
||||
|
||||
- Extract the contents of a given xar archive to the current directory:
|
||||
|
||||
`xar -xf {{archive.xar}}`
|
19
pages/common/yank.md
Normal file
19
pages/common/yank.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# yank
|
||||
|
||||
> Read input from stdin and display a selection interface that allows a field to be selected and copied to the clipboard.
|
||||
|
||||
- Yank using the default delimiters (\f, \n, \r, \s, \t):
|
||||
|
||||
`{{sudo dmesg}} | yank`
|
||||
|
||||
- Yank an entire line:
|
||||
|
||||
`{{sudo dmesg}} | yank -l`
|
||||
|
||||
- Yank using a specific delimiter:
|
||||
|
||||
`{{echo hello=world}} | yank -d {{=}}`
|
||||
|
||||
- Only yank fields matching a specific pattern:
|
||||
|
||||
`{{ps ux}} | yank -g "{{[0-9]+}}"`
|
Reference in New Issue
Block a user