mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 05:42:09 +02:00
hexdump, logger, netstat, n, nm, pdfgrep: move to common (#6549)
This commit is contained in:
parent
f79d8e56e3
commit
442a013cb8
17 changed files with 2 additions and 129 deletions
|
@ -1,6 +1,7 @@
|
|||
# hexdump
|
||||
|
||||
> 一个 ASCII、十进制、十六进制、八进制转换查看工具。
|
||||
> 一个 ASCII,十进制,十六进制,八进制转换查看工具。
|
||||
> 更多信息:<https://manned.org/hexdump>.
|
||||
|
||||
- 打印文件的十六进制表示形式:
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
# hexdump
|
||||
|
||||
> An ASCII, decimal, hexadecimal, octal dump.
|
||||
> More information: <https://www.unix.com/man-page/osx/1/HEXDUMP>.
|
||||
|
||||
- Print the hexadecimal representation of a file:
|
||||
|
||||
`hexdump {{file}}`
|
||||
|
||||
- Display the input offset in hexadecimal and its ASCII representation in two columns:
|
||||
|
||||
`hexdump -C {{file}}`
|
||||
|
||||
- Display the hexadecimal representation of a file, but interpret only n bytes of the input:
|
||||
|
||||
`hexdump -C -n{{number_of_bytes}} {{file}}`
|
|
@ -1,23 +0,0 @@
|
|||
# logger
|
||||
|
||||
> Add messages to syslog (/var/log/syslog).
|
||||
|
||||
- Log a message to syslog:
|
||||
|
||||
`logger {{message}}`
|
||||
|
||||
- Take input from stdin and log to syslog:
|
||||
|
||||
`echo {{log_entry}} | logger`
|
||||
|
||||
- Send the output to a remote syslog server running at a given port. Default port is 514:
|
||||
|
||||
`echo {{log_entry}} | logger -h {{hostname}} -P {{port}}`
|
||||
|
||||
- Use a specific tag for every line logged. Default is the name of logged in user:
|
||||
|
||||
`echo {{log_entry}} | logger -t {{tag}}`
|
||||
|
||||
- Log messages with a given priority. Default is `user.notice`. See `man logger` for all priority options:
|
||||
|
||||
`echo {{log_entry}} | logger -p {{user.warning}}`
|
|
@ -1,23 +0,0 @@
|
|||
# n
|
||||
|
||||
> Tool to manage multiple node versions.
|
||||
|
||||
- Install a given version of node. If the version is already installed, it will be activated:
|
||||
|
||||
`n {{version}}`
|
||||
|
||||
- Display installed versions and interactively activate one of them:
|
||||
|
||||
`n`
|
||||
|
||||
- Remove a version:
|
||||
|
||||
`n rm {{version}}`
|
||||
|
||||
- Execute a file with a given version:
|
||||
|
||||
`n use {{version}} {{file.js}}`
|
||||
|
||||
- Output binary path for a version:
|
||||
|
||||
`n bin {{version}}`
|
|
@ -1,24 +0,0 @@
|
|||
# netstat
|
||||
|
||||
> Displays network-related information such as open connections, open socket ports, etc.
|
||||
> More information: <https://www.unix.com/man-page/osx/1/netstat>.
|
||||
|
||||
- List all ports:
|
||||
|
||||
`netstat -a`
|
||||
|
||||
- List all listening ports:
|
||||
|
||||
`netstat -l`
|
||||
|
||||
- List listening TCP ports:
|
||||
|
||||
`netstat -t`
|
||||
|
||||
- Display PID and program names for a specific protocol:
|
||||
|
||||
`netstat -p {{protocol}}`
|
||||
|
||||
- Print the routing table:
|
||||
|
||||
`netstat -nr`
|
|
@ -1,19 +0,0 @@
|
|||
# nm
|
||||
|
||||
> List symbol names in object files.
|
||||
|
||||
- List global (extern) functions in a file (prefixed with T):
|
||||
|
||||
`nm -g {{file.o}}`
|
||||
|
||||
- List only undefined symbols in a file:
|
||||
|
||||
`nm -u {{file.o}}`
|
||||
|
||||
- List all symbols, even debugging symbols:
|
||||
|
||||
`nm -a {{file.o}}`
|
||||
|
||||
- Demangle C++ symbols (make them readable):
|
||||
|
||||
`nm -demangle {{file.o}}`
|
|
@ -1,23 +0,0 @@
|
|||
# pdfgrep
|
||||
|
||||
> Search text in PDF files.
|
||||
|
||||
- Find lines that match pattern in a PDF:
|
||||
|
||||
`pdfgrep {{pattern}} {{file.pdf}}`
|
||||
|
||||
- Include file name and page number for each matched line:
|
||||
|
||||
`pdfgrep --with-filename --page-number {{pattern}} {{file.pdf}}`
|
||||
|
||||
- Do a case-insensitive search for lines that begin with "foo" and return the first 3 matches:
|
||||
|
||||
`pdfgrep --max-count {{3}} --ignore-case {{'^foo'}} {{file.pdf}}`
|
||||
|
||||
- Find pattern in files with a `.pdf` extension in the current directory recursively:
|
||||
|
||||
`pdfgrep --recursive {{pattern}}`
|
||||
|
||||
- Find pattern on files that match a specific glob in the current directory recursively:
|
||||
|
||||
`pdfgrep --recursive --include {{'*book.pdf'}} {{pattern}}`
|
Loading…
Add table
Reference in a new issue