pwgen, sshuttle, trap, tree: move to common (#6551)

This commit is contained in:
marchersimon 2021-09-19 16:13:40 +02:00 committed by GitHub
parent e94e6af882
commit 6474a32842
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 0 additions and 88 deletions

View File

@ -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}}`

View File

@ -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}}`

View File

@ -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}}`

View File

@ -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}}'`