From f1f70242ac962de8f3ad8c03f1ed8c9f23fe3db9 Mon Sep 17 00:00:00 2001 From: Uggla Date: Tue, 4 Aug 2015 23:09:22 +0200 Subject: [PATCH 1/4] Update documentation with the following changes : -Add flow control information. -Add byobu information. -Add onsgmls and Xpath information. --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9ac3b60..7486712 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,8 @@ Notes: - Be familiar with Bash job management: `&`, **ctrl-z**, **ctrl-c**, `jobs`, `fg`, `bg`, `kill`, etc. +- Know flow control management xon/xoff : ctrl-s, ctrl-q and shift-PageUp, shift-PageDown to navigate the console screen. + - Know `ssh`, and the basics of passwordless authentication, via `ssh-agent`, `ssh-add`, etc. - Basic file management: `ls` and `ls -l` (in particular, learn what every column in `ls -l` means), `less`, `head`, `tail` and `tail -f` (or even better, `less +F`), `ln` and `ln -s` (learn the differences and advantages of hard versus soft links), `chown`, `chmod`, `du` (for a quick summary of disk usage: `du -hs *`). For filesystem management, `df`, `mount`, `fdisk`, `mkfs`, `lsblk`. @@ -126,7 +128,7 @@ Notes: - Use `man ascii` for a good ASCII table, with hex and decimal values. For general encoding info, `man unicode`, `man utf-8`, and `man latin1` are helpful. -- Use `screen` or [`tmux`](https://tmux.github.io/) to multiplex the screen, especially useful on remote ssh sessions and to detach and re-attach to a session. A more minimal alternative for session persistence only is `dtach`. +- Use `screen` or [`tmux`](https://tmux.github.io/) to multiplex the screen, especially useful on remote ssh sessions and to detach and re-attach to a session. A more minimal alternative for session persistence only is `dtach`. `byobu` can enhance screen or tmux providing more information and easier management. - In ssh, knowing how to port tunnel with `-L` or `-D` (and occasionally `-R`) is useful, e.g. to access web sites from a remote server. @@ -168,7 +170,9 @@ Notes: - For Markdown, HTML, and all kinds of document conversion, try [`pandoc`](http://pandoc.org/). -- If you must handle XML, `xmlstarlet` is old but good. +- If you must handle XML, `xmlstarlet` is old but good. `Xpath` can be used to query xml files. + +- Handling, parsing sgml, html, `onsgmls` can be used. - For JSON, use [`jq`](http://stedolan.github.io/jq/). From 081f826508a7c42c15bd8c0d04d5dc3ba77662c9 Mon Sep 17 00:00:00 2001 From: Uggla Date: Thu, 6 Aug 2015 16:04:02 +0200 Subject: [PATCH 2/4] Update english documentation : - Add info about vi (ESC-v). - Add tr. - Add vimdiff. --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7486712..9f5d1d8 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Notes: - In Bash, use **ctrl-w** to delete the last word, and **ctrl-u** to delete all the way back to the start of the line. Use **alt-b** and **alt-f** to move by word, **ctrl-a** to move cursor to beginning of line, **ctrl-e** to move cursor to end of line, **ctrl-k** to kill to the end of the line, **ctrl-l** to clear the screen. See `man readline` for all the default keybindings in Bash. There are a lot. For example **alt-.** cycles through previous arguments, and **alt-*** expands a glob. -- Alternatively, if you love vi-style key-bindings, use `set -o vi`. +- Alternatively, if you love vi-style key-bindings, use `set -o vi`. In order to write long commands you can use the famous `ESC-v` that will allow to edit your command inside vi. Note : EDITOR=vim environment variable must be set as well. - To see recent commands, `history`. There are also many abbreviations such as `!$` (last argument) and `!!` last command, though these are often easily replaced with **ctrl-r** and **alt-.**. @@ -188,6 +188,8 @@ Notes: - Know about `tee` to copy from stdin to a file and also to stdout, as in `ls -al | tee file.txt`. +- Know about `tr` to transpose characters. Very efficient to remove carriage return ('\n'). + - Know that locale affects a lot of command line tools in subtle ways, including sorting order (collation) and performance. Most Linux installations will set `LANG` or other locale variables to a local setting like US English. But be aware sorting will change if you change locale. And know i18n routines can make sort or other commands run *many times* slower. In some situations (such as the set operations or uniqueness operations below) you can safely ignore slow i18n routines entirely and use traditional byte-based sort order, using `export LC_ALL=C`. - Know basic `awk` and `sed` for simple data munging. For example, summing all numbers in the third column of a text file: `awk '{ x += $3 } END { print x }'`. This is probably 3X faster and 3X shorter than equivalent Python. @@ -211,7 +213,9 @@ Notes: - If you ever need to write a tab literal in a command line in Bash (e.g. for the -t argument to sort), press **ctrl-v** **[Tab]** or write `$'\t'` (the latter is better as you can copy/paste it). -- The standard tools for patching source code are `diff` and `patch`. See also `diffstat` for summary statistics of a diff. Note `diff -r` works for entire directories. Use `diff -r tree1 tree2 | diffstat` for a summary of changes. +- The standard tools for patching source code are `diff` and `patch`. See also `diffstat` for summary statistics of a diff and `sdiff` easier to read diff. Note `diff -r` works for entire directories. Use `diff -r tree1 tree2 | diffstat` for a summary of changes. + +- Use `vimdiff` to compare and edit files. Really efficient ! - For binary files, use `hd` for simple hex dumps and `bvi` for binary editing. From 9846a93aac06b883bacd73f905ae51acafe5cd88 Mon Sep 17 00:00:00 2001 From: Uggla Date: Tue, 4 Aug 2015 23:09:22 +0200 Subject: [PATCH 3/4] Update documentation with the following changes : -Add flow control information. -Add byobu information. -Add onsgmls and Xpath information. --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 10ea84e..444a5de 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,8 @@ Notes: - Be familiar with Bash job management: `&`, **ctrl-z**, **ctrl-c**, `jobs`, `fg`, `bg`, `kill`, etc. +- Know flow control management xon/xoff : ctrl-s, ctrl-q and shift-PageUp, shift-PageDown to navigate the console screen. + - Know `ssh`, and the basics of passwordless authentication, via `ssh-agent`, `ssh-add`, etc. - Basic file management: `ls` and `ls -l` (in particular, learn what every column in `ls -l` means), `less`, `head`, `tail` and `tail -f` (or even better, `less +F`), `ln` and `ln -s` (learn the differences and advantages of hard versus soft links), `chown`, `chmod`, `du` (for a quick summary of disk usage: `du -hs *`). For filesystem management, `df`, `mount`, `fdisk`, `mkfs`, `lsblk`. @@ -126,7 +128,7 @@ Notes: - Use `man ascii` for a good ASCII table, with hex and decimal values. For general encoding info, `man unicode`, `man utf-8`, and `man latin1` are helpful. -- Use `screen` or [`tmux`](https://tmux.github.io/) to multiplex the screen, especially useful on remote ssh sessions and to detach and re-attach to a session. A more minimal alternative for session persistence only is `dtach`. +- Use `screen` or [`tmux`](https://tmux.github.io/) to multiplex the screen, especially useful on remote ssh sessions and to detach and re-attach to a session. A more minimal alternative for session persistence only is `dtach`. `byobu` can enhance screen or tmux providing more information and easier management. - In ssh, knowing how to port tunnel with `-L` or `-D` (and occasionally `-R`) is useful, e.g. to access web sites from a remote server. @@ -168,7 +170,9 @@ Notes: - For Markdown, HTML, and all kinds of document conversion, try [`pandoc`](http://pandoc.org/). -- If you must handle XML, `xmlstarlet` is old but good. +- If you must handle XML, `xmlstarlet` is old but good. `Xpath` can be used to query xml files. + +- Handling, parsing sgml, html, `onsgmls` can be used. - For JSON, use [`jq`](http://stedolan.github.io/jq/). From e498f5865bf79c62397e58519e078ec19db6c050 Mon Sep 17 00:00:00 2001 From: Uggla Date: Thu, 6 Aug 2015 16:04:02 +0200 Subject: [PATCH 4/4] Update english documentation : - Add info about vi (ESC-v). - Add tr. - Add vimdiff. --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 444a5de..8053a77 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Notes: - In Bash, use **ctrl-w** to delete the last word, and **ctrl-u** to delete all the way back to the start of the line. Use **alt-b** and **alt-f** to move by word, **ctrl-a** to move cursor to beginning of line, **ctrl-e** to move cursor to end of line, **ctrl-k** to kill to the end of the line, **ctrl-l** to clear the screen. See `man readline` for all the default keybindings in Bash. There are a lot. For example **alt-.** cycles through previous arguments, and **alt-*** expands a glob. -- Alternatively, if you love vi-style key-bindings, use `set -o vi`. +- Alternatively, if you love vi-style key-bindings, use `set -o vi`. In order to write long commands you can use the famous `ESC-v` that will allow to edit your command inside vi. Note : EDITOR=vim environment variable must be set as well. - To see recent commands, `history`. There are also many abbreviations such as `!$` (last argument) and `!!` last command, though these are often easily replaced with **ctrl-r** and **alt-.**. @@ -188,6 +188,8 @@ Notes: - Know about `tee` to copy from stdin to a file and also to stdout, as in `ls -al | tee file.txt`. +- Know about `tr` to transpose characters. Very efficient to remove carriage return ('\n'). + - Know that locale affects a lot of command line tools in subtle ways, including sorting order (collation) and performance. Most Linux installations will set `LANG` or other locale variables to a local setting like US English. But be aware sorting will change if you change locale. And know i18n routines can make sort or other commands run *many times* slower. In some situations (such as the set operations or uniqueness operations below) you can safely ignore slow i18n routines entirely and use traditional byte-based sort order, using `export LC_ALL=C`. - Know basic `awk` and `sed` for simple data munging. For example, summing all numbers in the third column of a text file: `awk '{ x += $3 } END { print x }'`. This is probably 3X faster and 3X shorter than equivalent Python. @@ -211,7 +213,9 @@ Notes: - If you ever need to write a tab literal in a command line in Bash (e.g. for the -t argument to sort), press **ctrl-v** **[Tab]** or write `$'\t'` (the latter is better as you can copy/paste it). -- The standard tools for patching source code are `diff` and `patch`. See also `diffstat` for summary statistics of a diff. Note `diff -r` works for entire directories. Use `diff -r tree1 tree2 | diffstat` for a summary of changes. +- The standard tools for patching source code are `diff` and `patch`. See also `diffstat` for summary statistics of a diff and `sdiff` easier to read diff. Note `diff -r` works for entire directories. Use `diff -r tree1 tree2 | diffstat` for a summary of changes. + +- Use `vimdiff` to compare and edit files. Really efficient ! - For binary files, use `hd` for simple hex dumps and `bvi` for binary editing.