mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
Update cheatsheets
This commit is contained in:
2
tldr/cmp
2
tldr/cmp
@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Output the byte numbers and values of every difference:
|
||||
|
||||
`cmp {{[-v|--verbose]}} {{path/to/file1}} {{path/to/file2}}`
|
||||
`cmp {{[-l|--verbose]}} {{path/to/file1}} {{path/to/file2}}`
|
||||
|
||||
- Compare files but output nothing, yield only the exit status:
|
||||
|
||||
|
||||
@@ -32,4 +32,4 @@ bar,foo
|
||||
`printf "header1
|
||||
bar
|
||||
foobar
|
||||
" | column {{[-c|{{[-c|--output-width]}}]}} {{30}} {{[-x|--fillrows]}}`
|
||||
" | column {{[-c|--output-width]}} {{30}} {{[-x|--fillrows]}}`
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Open the man page for a command in a browser (`BROWSER` environment variable can replace `=browser_name`):
|
||||
|
||||
`man {{[-H|--html=]}}{{browser_name}} {{command}}`
|
||||
`man {{[-Hbrowser_name|--html=browser_name]}} {{command}}`
|
||||
|
||||
- Display the man page for a command from section 7:
|
||||
|
||||
|
||||
@@ -24,6 +24,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`shutdown -h 13:00`
|
||||
|
||||
- [c]ancel a pending shutdown/reboot operation:
|
||||
- Cancel a pending shutdown/reboot operation:
|
||||
|
||||
`shutdown -c`
|
||||
|
||||
@@ -8,11 +8,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Troubleshooting tool for tracing system calls.
|
||||
> More information: <https://manned.org/strace>.
|
||||
|
||||
- Start tracing a specific [p]rocess by its PID:
|
||||
- Start tracing a specific process by its PID:
|
||||
|
||||
`strace {{[-p|--attach]}} {{pid}}`
|
||||
|
||||
- Trace a [p]rocess and filter output by system call [e]xpression:
|
||||
- Trace a process and filter output by system call [e]xpression:
|
||||
|
||||
`strace {{[-p|--attach]}} {{pid}} -e {{system_call,system_call2,...}}`
|
||||
|
||||
|
||||
2
tldr/ps
2
tldr/ps
@@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- List all processes of the current user as a tree:
|
||||
|
||||
`ps {{[-u|--user]}} $(id {{[-u|--user]}}) {{[f|--forest]}}`
|
||||
`ps {{[-u|--user]}} $(id {{[-u|--user]}}) f`
|
||||
|
||||
- Get the parent PID of a process:
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Keep reading file until `<Ctrl c>`, even if the file is inaccessible:
|
||||
|
||||
`tail --retry {{[-f|--follow]}} {{path/to/file}}`
|
||||
`tail {{[-F|--retry --follow]}} {{path/to/file}}`
|
||||
|
||||
- Show last 'num' lines in 'file' and refresh every 'n' seconds:
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Capture the traffic from a specific interface, source, destination and destination port:
|
||||
|
||||
`tcpdump {{[-i|--interface]} {{eth0}} src {{192.168.1.1}} and dst {{192.168.1.2}} and dst port {{80}}`
|
||||
`sudo tcpdump {{[-i|--interface]} {{eth0}} src {{192.168.1.1}} and dst {{192.168.1.2}} and dst port {{80}}`
|
||||
|
||||
- Capture the traffic of a network:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user