From 6474a3284244a623c5ba32264a99d6a27a3bcce3 Mon Sep 17 00:00:00 2001 From: marchersimon <50295997+marchersimon@users.noreply.github.com> Date: Sun, 19 Sep 2021 16:13:40 +0200 Subject: [PATCH] pwgen, sshuttle, trap, tree: move to common (#6551) --- pages.it/{linux => common}/tree.md | 0 pages.pt_BR/{linux => common}/tree.md | 0 pages.tr/{linux => common}/tree.md | 0 pages.zh/{osx => common}/pwgen.md | 0 pages.zh/{osx => common}/sshuttle.md | 0 pages.zh/{osx => common}/trap.md | 0 pages.zh/{osx => common}/tree.md | 0 pages/{linux => common}/pwgen.md | 0 pages/{linux => common}/sshuttle.md | 0 pages/{linux => common}/trap.md | 0 pages/{linux => common}/tree.md | 0 pages/osx/pwgen.md | 15 ----------- pages/osx/sshuttle.md | 17 ------------- pages/osx/trap.md | 20 --------------- pages/osx/tree.md | 36 --------------------------- 15 files changed, 88 deletions(-) rename pages.it/{linux => common}/tree.md (100%) rename pages.pt_BR/{linux => common}/tree.md (100%) rename pages.tr/{linux => common}/tree.md (100%) rename pages.zh/{osx => common}/pwgen.md (100%) rename pages.zh/{osx => common}/sshuttle.md (100%) rename pages.zh/{osx => common}/trap.md (100%) rename pages.zh/{osx => common}/tree.md (100%) rename pages/{linux => common}/pwgen.md (100%) rename pages/{linux => common}/sshuttle.md (100%) rename pages/{linux => common}/trap.md (100%) rename pages/{linux => common}/tree.md (100%) delete mode 100644 pages/osx/pwgen.md delete mode 100644 pages/osx/sshuttle.md delete mode 100644 pages/osx/trap.md delete mode 100644 pages/osx/tree.md diff --git a/pages.it/linux/tree.md b/pages.it/common/tree.md similarity index 100% rename from pages.it/linux/tree.md rename to pages.it/common/tree.md diff --git a/pages.pt_BR/linux/tree.md b/pages.pt_BR/common/tree.md similarity index 100% rename from pages.pt_BR/linux/tree.md rename to pages.pt_BR/common/tree.md diff --git a/pages.tr/linux/tree.md b/pages.tr/common/tree.md similarity index 100% rename from pages.tr/linux/tree.md rename to pages.tr/common/tree.md diff --git a/pages.zh/osx/pwgen.md b/pages.zh/common/pwgen.md similarity index 100% rename from pages.zh/osx/pwgen.md rename to pages.zh/common/pwgen.md diff --git a/pages.zh/osx/sshuttle.md b/pages.zh/common/sshuttle.md similarity index 100% rename from pages.zh/osx/sshuttle.md rename to pages.zh/common/sshuttle.md diff --git a/pages.zh/osx/trap.md b/pages.zh/common/trap.md similarity index 100% rename from pages.zh/osx/trap.md rename to pages.zh/common/trap.md diff --git a/pages.zh/osx/tree.md b/pages.zh/common/tree.md similarity index 100% rename from pages.zh/osx/tree.md rename to pages.zh/common/tree.md diff --git a/pages/linux/pwgen.md b/pages/common/pwgen.md similarity index 100% rename from pages/linux/pwgen.md rename to pages/common/pwgen.md diff --git a/pages/linux/sshuttle.md b/pages/common/sshuttle.md similarity index 100% rename from pages/linux/sshuttle.md rename to pages/common/sshuttle.md diff --git a/pages/linux/trap.md b/pages/common/trap.md similarity index 100% rename from pages/linux/trap.md rename to pages/common/trap.md diff --git a/pages/linux/tree.md b/pages/common/tree.md similarity index 100% rename from pages/linux/tree.md rename to pages/common/tree.md diff --git a/pages/osx/pwgen.md b/pages/osx/pwgen.md deleted file mode 100644 index 70f4cc67ff..0000000000 --- a/pages/osx/pwgen.md +++ /dev/null @@ -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}}` diff --git a/pages/osx/sshuttle.md b/pages/osx/sshuttle.md deleted file mode 100644 index 372f062596..0000000000 --- a/pages/osx/sshuttle.md +++ /dev/null @@ -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: . - -- 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}}` diff --git a/pages/osx/trap.md b/pages/osx/trap.md deleted file mode 100644 index 325b1c1230..0000000000 --- a/pages/osx/trap.md +++ /dev/null @@ -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}}` diff --git a/pages/osx/tree.md b/pages/osx/tree.md deleted file mode 100644 index 0ee158cde2..0000000000 --- a/pages/osx/tree.md +++ /dev/null @@ -1,36 +0,0 @@ -# tree - -> Show the contents of the current directory as a tree. -> More information: . - -- 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}}'`