mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-09-11 03:55:31 +03:00
pwgen, sshuttle, trap, tree: move to common (#6551)
This commit is contained in:
parent
e94e6af882
commit
6474a32842
@ -1,15 +0,0 @@
|
||||
# pwgen
|
||||
|
||||
> Generate pronounceable passwords.
|
||||
|
||||
- Generate random password with s[y]mbols:
|
||||
|
||||
`pwgen -y {{length}}`
|
||||
|
||||
- Generate secure, hard-to-memorize passwords:
|
||||
|
||||
`pwgen -s {{length}}`
|
||||
|
||||
- Generate password with at least one capital letter in them:
|
||||
|
||||
`pwgen -c {{length}}`
|
@ -1,17 +0,0 @@
|
||||
# sshuttle
|
||||
|
||||
> Transparent proxy server that tunnels traffic over an SSH connection.
|
||||
> Doesn't require admin, or any special setup on the remote SSH server.
|
||||
> More information: <https://github.com/sshuttle/sshuttle>.
|
||||
|
||||
- Forward all IPv4 TCP traffic via a remote SSH server:
|
||||
|
||||
`sshuttle --remote={{username}}@{{sshserver}} {{0.0.0.0/0}}`
|
||||
|
||||
- Forward all IPv4 TCP and DNS traffic:
|
||||
|
||||
`sshuttle --dns --remote={{username}}@{{sshserver}} {{0.0.0.0/0}}`
|
||||
|
||||
- Use the tproxy method to forward all IPv4 and IPv6 traffic:
|
||||
|
||||
`sudo sshuttle --method=tproxy --remote={{username}}@{{sshserver}} {{0.0.0.0/0}} {{::/0}} --exclude={{your_local_ip_address}} --exclude={{ssh_server_ip_address}}`
|
@ -1,20 +0,0 @@
|
||||
# trap
|
||||
|
||||
> Automatically execute commands after receiving signals by processes or the operating system.
|
||||
> Can be used to perform cleanups for interruptions by the user or other actions.
|
||||
|
||||
- List available signals to set traps for:
|
||||
|
||||
`trap -l`
|
||||
|
||||
- List active traps for the current shell:
|
||||
|
||||
`trap -p`
|
||||
|
||||
- Set a trap to execute commands when one or more signals are detected:
|
||||
|
||||
`trap 'echo "Caught signal {{SIGHUP}}"' {{SIGHUP}}`
|
||||
|
||||
- Remove active traps:
|
||||
|
||||
`trap - {{SIGHUP}} {{SIGINT}}`
|
@ -1,36 +0,0 @@
|
||||
# tree
|
||||
|
||||
> Show the contents of the current directory as a tree.
|
||||
> More information: <http://mama.indstate.edu/users/ice/tree/>.
|
||||
|
||||
- Print files and directories up to 'num' levels of depth (where 1 means the current directory):
|
||||
|
||||
`tree -L {{num}}`
|
||||
|
||||
- Print directories only:
|
||||
|
||||
`tree -d`
|
||||
|
||||
- Print hidden files too with colorization on:
|
||||
|
||||
`tree -a -C`
|
||||
|
||||
- Print the tree without indentation lines, showing the full path instead (use `-N` to not escape whitespace and special characters):
|
||||
|
||||
`tree -i -f`
|
||||
|
||||
- Print the size of each node next to it, in human-readable format, with directories displaying their cumulative size (as in the `du` command):
|
||||
|
||||
`tree -s -h --du`
|
||||
|
||||
- Print files within the tree hierarchy, using a wildcard (glob) pattern, and pruning out directories that don't contain matching files:
|
||||
|
||||
`tree -P '{{*.txt}}' --prune`
|
||||
|
||||
- Print directories within the tree hierarchy, using the wildcard (glob) pattern, and pruning out directories that aren't ancestors of the wanted one:
|
||||
|
||||
`tree -P {{directory_name}} --matchdirs --prune`
|
||||
|
||||
- Print the tree ignoring the given directories:
|
||||
|
||||
`tree -I '{{directory_name1|directory_name2}}'`
|
Loading…
Reference in New Issue
Block a user