diff --git a/linux_toolkit_2021/bash.sh b/linux_toolkit_2021/bash.sh new file mode 100644 index 0000000000000000000000000000000000000000..483af598aa09702b2b7efb1cac085813296cf5c0 --- /dev/null +++ b/linux_toolkit_2021/bash.sh @@ -0,0 +1,10 @@ +#! /bin/bash + +keypause=200 +commandpause=3 + +while read line +do + xdotool key --delay $keypause $line + sleep $commandpause +od < $1 diff --git a/linux_toolkit_2021/css/remark.css b/linux_toolkit_2021/css/remark.css index 475808d44bb090ad6cb3c224550da04e3c149cc7..73ea92d818e3b0652def11282c1292aafa4078ca 100644 --- a/linux_toolkit_2021/css/remark.css +++ b/linux_toolkit_2021/css/remark.css @@ -28,11 +28,6 @@ h1, h2, h3 { max-width: 100%; } - -img { - width: 40%; -} - .remark-inline-code { color: #f18a21; } diff --git a/linux_toolkit_2021/illustrations.bmpr b/linux_toolkit_2021/illustrations.bmpr new file mode 100644 index 0000000000000000000000000000000000000000..7a31a7bb976f5151d63ebd9aada2d112eb49cbbb Binary files /dev/null and b/linux_toolkit_2021/illustrations.bmpr differ diff --git a/linux_toolkit_2021/images/categorization.png b/linux_toolkit_2021/images/categorization.png new file mode 100644 index 0000000000000000000000000000000000000000..45b22cbb3fadccf305602d3073654c5b30758c66 --- /dev/null +++ b/linux_toolkit_2021/images/categorization.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e892c4f46356213614b559b5941dffe2c8ac3193cb073319aaa452421087e218 +size 8176 diff --git a/linux_toolkit_2021/images/terminal_old.jpg b/linux_toolkit_2021/images/terminal_old.jpg new file mode 100644 index 0000000000000000000000000000000000000000..40268b252c619e7afb356d862ccadc346f0b20dd --- /dev/null +++ b/linux_toolkit_2021/images/terminal_old.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e73ddb8fd592117d6369cb5dbd5827dc3cbd0e982f9b8e8f25ccdcc19004951f +size 124042 diff --git a/linux_toolkit_2021/images/terminal_old.webp b/linux_toolkit_2021/images/terminal_old.webp new file mode 100644 index 0000000000000000000000000000000000000000..fcd285bd05f9ce84a834b7b4dd7e2ea5f9db3444 Binary files /dev/null and b/linux_toolkit_2021/images/terminal_old.webp differ diff --git a/linux_toolkit_2021/index.html b/linux_toolkit_2021/index.html index 429258a85cf983f14f1534a05b5ad0adca465727..0f370f80bc266f88cbe683eedf66dc4efb551486 100644 --- a/linux_toolkit_2021/index.html +++ b/linux_toolkit_2021/index.html @@ -25,6 +25,7 @@ class: center, middle ...a wide spectrum of available **tools** and what you can do with them. + --- # Goals @@ -78,12 +79,13 @@ Many of the classical Linux tools adhere to the "UNIX principle": In a wider, non-programming sense: It's useful to learn things that are small, orthogonal, and compose. +--- # Bash Related words: terminal, terminal emulator, shell, command line, ... -<img src="images/bash.png"> +<img src="images/bash.png" width="50%"> In a nutshell: Bash is a tool that let's you interact with your computer via text. @@ -105,11 +107,37 @@ Some commands are really just programs: try typing `firefox` and hitting Enter i --- -# TODO ls & cd video +# Filesystem basics + +List files and show where we are: + +```bash +ls +pwd +``` + +Enter or leave directories: + +```bash +cd my_folder +cd .. +cd /home/nils/Desktop +cd ~/Desktop +``` --- -# TODO: vocab +# Bash terminology + +**terminal** is the window in which bash runs. + +bash is a kind of **shell**. there are others! + + +<img src="images/terminal_old.webp" alt="https://www.reddit.com/r/raspberry_pi/comments/6se1qy/old_terminal_connected_to_my_pi_emulating_a_modem/" width="60%"> + + + --- @@ -131,9 +159,7 @@ Both redirect command output: - `|` redirects to a new command ("piping") - `>` redirects into a file ("file redirection" or "redirection" for short) -<img src="images/cat.png" width="30%"> -<img src="images/catpipe.png" width="30%"> -<img src="images/catpiperedirection.png" width="30%"> +<img src="images/catpiperedirection.png" width="60%"> --- @@ -174,6 +200,8 @@ done --- +class: center, middle + # Tool Galore We will now talk about multiple tools and how to combine them using bash (mostly). @@ -190,7 +218,7 @@ two main choices: these fill niches that bash doesn't, but are still close to the system. -<img src="images/polygon.png"> +<img src="images/polygon.png" width="50%"> --- @@ -394,12 +422,27 @@ xdotool mousemove 20 100 click 1 sleep 2 mosemove 100 20 --- +# Summary + +<img src="images/categorization.png" width="60%"> + +Categories: +- downloading (like wget, ssh, rsync) +- text processing (like vim, sed, bash) +- file conversion (like ffmpeg, pandoc, convert) +- searching (like sed, grep, find) +- glue (like xdotools, rofi, xbindkeys, notify-send, python, bash) + +--- + # Longlist of interesting tools **stow** lets you manage config files easily. **ranger** is a console-based file manager. **i3** is an alternative window-manager. -**borg** is a backup tool. +**borg** is a backup tool. +**nano** is an easy to use console text-editor. +**rsync** to copy files between machines. ---