From 480928ab7c68b42320023740370a1cb6869143d2 Mon Sep 17 00:00:00 2001 From: benjamyn Date: Mon, 25 Feb 2019 23:20:44 +1100 Subject: [PATCH] Added in the new files and swapped the theme to my modified version of bootstrap386 --- docs/{ => Commands}/commands.md | 0 docs/{ => Commands}/regex.md | 0 docs/{ => Configuration}/wireguard.md | 0 docs/{ => Linux}/shellbasics.md | 15 ++++++++++----- docs/{ => Troubleshooting}/connections.md | 4 ++-- docs/examples/{regexmatch.md => Regex.md} | 1 + docs/examples/{seddnszone.md => sed.md} | 4 ++-- docs/index.md | 11 ++++++++--- mkdocs.yml | 10 +++------- mkdocs.yml.old | 7 +++++++ 10 files changed, 33 insertions(+), 19 deletions(-) rename docs/{ => Commands}/commands.md (100%) rename docs/{ => Commands}/regex.md (100%) rename docs/{ => Configuration}/wireguard.md (100%) rename docs/{ => Linux}/shellbasics.md (89%) rename docs/{ => Troubleshooting}/connections.md (90%) rename docs/examples/{regexmatch.md => Regex.md} (99%) rename docs/examples/{seddnszone.md => sed.md} (94%) create mode 100644 mkdocs.yml.old diff --git a/docs/commands.md b/docs/Commands/commands.md similarity index 100% rename from docs/commands.md rename to docs/Commands/commands.md diff --git a/docs/regex.md b/docs/Commands/regex.md similarity index 100% rename from docs/regex.md rename to docs/Commands/regex.md diff --git a/docs/wireguard.md b/docs/Configuration/wireguard.md similarity index 100% rename from docs/wireguard.md rename to docs/Configuration/wireguard.md diff --git a/docs/shellbasics.md b/docs/Linux/shellbasics.md similarity index 89% rename from docs/shellbasics.md rename to docs/Linux/shellbasics.md index 0436080..836b7ae 100644 --- a/docs/shellbasics.md +++ b/docs/Linux/shellbasics.md @@ -1,20 +1,25 @@ -# Basics of the linux shell +# Basics + + +Basics of the Linus Shell + ## Streams -The linux shell (this will usually be [`bash`](bash.md)) works using different streams +The linux shell (this will usually be [`bash`](/Linux/bash.md)) works using different streams The main three streams that are used on the command line are STDIN (Standard input), STDOUT (Standard output), STDERR (Standard Error) -|ID|STREAM|USE| -|---|:----|:---| +|STREAM ID \| | STREAM NAME \| | STREAM USE| +|------------|------|-----| | 0 | STDIN | Used to send input to the program | | 1 | STDOUT | Used to receive output from the program | | 2 | STDERR | Used to receive errors from the program | + ### Standard Input -Standard input is how we send input to an application it is also how we interact with the command line shell (Usually [`bash`](/bash.md)) +Standard input is how we send input to an application it is also how we interact with the command line shell (Usually [`bash`](/Linux/bash.md)) Whenever a linux program asks for input this is sent to the program using the STDIN stream diff --git a/docs/connections.md b/docs/Troubleshooting/connections.md similarity index 90% rename from docs/connections.md rename to docs/Troubleshooting/connections.md index 878cecd..a5d90bc 100644 --- a/docs/connections.md +++ b/docs/Troubleshooting/connections.md @@ -1,4 +1,4 @@ -#Connections to servers +# Connections to servers Usually connections to servers are a sign that all is working, occasionally though some nefarious parties decide that they really like the server and want to hog all the connections to themselves. @@ -18,6 +18,6 @@ In these situations we will usually see a high connection count for certain serv Finding IP addresses connecting to HTTP is quite easy, all you should need to do is tail access logs to find the IP addresses -You can use a command like `tail -f /home/*/access-logs/* | awk '{print $1}'` to get a live update on connections via HTTP/HTTPS on the server. [For more information on the commands used click here](commands.md) *__Note: This will only check sites in /home__* +You can use a command like `tail -f /home/*/access-logs/* | awk '{print $1}'` to get a live update on connections via HTTP/HTTPS on the server. [For more information on the commands used click here](/Commands/commands.md) *__Note: This will only check sites in /home__* ##SMTP \ No newline at end of file diff --git a/docs/examples/regexmatch.md b/docs/examples/Regex.md similarity index 99% rename from docs/examples/regexmatch.md rename to docs/examples/Regex.md index e050cc7..7d7c44d 100644 --- a/docs/examples/regexmatch.md +++ b/docs/examples/Regex.md @@ -1,6 +1,7 @@ # Regex examples ## Match an IP address + `\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}` If we use this expression on the following using grep to search the file diff --git a/docs/examples/seddnszone.md b/docs/examples/sed.md similarity index 94% rename from docs/examples/seddnszone.md rename to docs/examples/sed.md index bbc2e87..6c79289 100644 --- a/docs/examples/seddnszone.md +++ b/docs/examples/sed.md @@ -1,6 +1,6 @@ -#Using `sed` to modify a DNS zone +# Using `sed` to modify a DNS zone -Take the following DNS zone as an example, say we needed to update the IP address from 110.232.142.185 to 45.65.88.152, you could modify the file using a text editor (see [editors](/commands#editors)) +Take the following DNS zone as an example, say we needed to update the IP address from 110.232.142.185 to 45.65.88.152, you could modify the file using a text editor (see [editors](/Commands/commands#editors)) ```bash $TTL 86400 diff --git a/docs/index.md b/docs/index.md index 51fcbe1..bf77c85 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,6 @@ -# Welcome to the necronomicon +# Home + +## Welcome to the necronomicon [Klaatu barada nikto](https://www.imdb.com/title/tt0106308/) @@ -8,5 +10,8 @@ This is a compendium of all the useless facts, tips, tricks and commands that I ## Quick Links -[Linux Shell Basics](/shellbasics) -[Commands](/commands) +\------------------------------------ + +[Linux Shell Basics](/Linux/shellbasics) + +[Commands](/Commands/commands) diff --git a/mkdocs.yml b/mkdocs.yml index acf2dc5..02bbc37 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,7 +1,3 @@ -site_name: Useful commands and tips -nav: - - Home: index.md - - Commands: commands.md - - Connections: connections.md - - Regex: regex.md -theme: readthedocs +site_name: Useful tips + +theme: bootstrap386 diff --git a/mkdocs.yml.old b/mkdocs.yml.old new file mode 100644 index 0000000..1b5e192 --- /dev/null +++ b/mkdocs.yml.old @@ -0,0 +1,7 @@ +site_name: Useful commands and tips +nav: + - Home: index.md + - Commands: commands.md + - Connections: connections.md + - Regex: regex.md +theme: bootstrap386