diff --git a/skill-tree.mm b/skill-tree.mm index 6a34d73..9d5a08a 100644 --- a/skill-tree.mm +++ b/skill-tree.mm @@ -192,7 +192,7 @@ - + @@ -312,6 +312,9 @@ + + + diff --git a/use/1/1/b.txt b/use/1/1/b.txt index cb6ab94..eeccb45 100644 --- a/use/1/1/b.txt +++ b/use/1/1/b.txt @@ -14,11 +14,11 @@ Part of this skill is the general principles of the interaction with a shell, to ## Learning Outcomes -* Utilize the bash shell to execute individual programs with arguments. -* Describe the meaning of the exit code of a program. -* Run multiple programs after another depending on the exit code ;, &&, ||. +* Use the bash shell to execute individual programs with arguments. * List the set of basic programs and their tasks: * pwd + * ls + * cd * whoami * sleep * kill @@ -27,23 +27,14 @@ Part of this skill is the general principles of the interaction with a shell, to * man * vi, vim, emacs, nano * exit -* Utilize the available help of a program (--help argument and the man pages). -* Interrupt or abort a program execution: - * CTRL-C - * CTRL-Z - * using kill -9 + * ... +* Demonstrate interrupting or aborting of a program execution using CTRL-C. +* Use the available help of a program (--help argument and the man pages). * Use the shell history to search and execute previously executed commands. -* Set and print shell variables. -* Print all currently set variables +* Demonstrate setting and printing shell variables. +* Show all currently set variables and set as well as unset one manually. * Identify potential special characters that must be handled with care. - * List strings that could refer to files/directories +* List strings that could refer to files/directories * Utilize escaping to ensure correct handling of arguments. -* Understand wildcard characters to select a group of files/directories: - * * - * ? - * [-,] -* How to close popular command line text editors with/or without saving changes: - * nano - * vi - * emacs +* Understand wildcard characters to select a group of files/directories: "*", "?", "[-,]" diff --git a/use/1/2/b.txt b/use/1/2/b.txt index 1bbed03..02dab17 100644 --- a/use/1/2/b.txt +++ b/use/1/2/b.txt @@ -15,7 +15,7 @@ This skill covers the bash shell. * Create a basic shell script that executes a sequence of programs. * Design a script using the bash construct "if" that handles conditional execution based on: - * Performing a test for the existing of a file/directory, + * Performing a test for the existing of a file/directory/variable, * Testing for the presence of certain text in a file, * Design a script that performs a task repeatedly using the bash "for" or "while" loop. * Utilize debugging options for troubleshooting of shell programs: diff --git a/use/1/3/b.txt b/use/1/3/b.txt index ad7183f..1608c89 100644 --- a/use/1/3/b.txt +++ b/use/1/3/b.txt @@ -10,6 +10,8 @@ Typically, several elementary programs are pre-installed and allow access and ma ## Requirements +* [[skill-tree:use:1:1:b]] + ## Learning Outcomes * Describe the organization of a hierarchical file system. diff --git a/use/1/4/b.txt b/use/1/4/b.txt index 379aaef..76ce2ec 100644 --- a/use/1/4/b.txt +++ b/use/1/4/b.txt @@ -5,7 +5,6 @@ Learning the ways of general interaction with the remote system and the tools in Users must connect to an HPC system typically using the Secure Shell (SSH), which then starts a shell and allows the interactive access. When the user disconnects, such a session is terminated. -A server-sided session that persists after disconnection enables the user to execute long-running programs remotely and allows the continuation of a previous session seamlessly. Data transfer between a local user system (e.g., desktop or laptop) and a remote system requires special tools. Interactive access is also allowed. @@ -13,6 +12,8 @@ The tools discussed here are generally valid for systems using Linux, Mac, Windo ## Requirements +* [[skill-tree:use:1:1:b]] + ## Learning Outcomes * Describe how SSH-authentication works: @@ -20,18 +21,13 @@ The tools discussed here are generally valid for systems using Linux, Mac, Windo * Public-key authentication. * The role of an authentication agent and the security implications. * Generate an SSH public/private key under Linux. -* Register a key for public-key authentication using ssh-copy-id. +* Register a key for public-key authentication using ssh-copy-id or other local methods. * Perform a remote login from Linux using SSH. -* Use SSH-agent or Windows equivalents. +* Use SSH-agent or equivalents. * Use Agent forwarding to connect to a third HPC system from an HPC system that you logged into with ssh from your computer. * Know when to use and how to create a config file. * Utilize tools to transfer data between the local and remote system: * scp * sftp * rsync (-avz) -* Describe how SSHFS allows mounting a remote directory to a local directory for interactive usage (Mac/Linux only), e.g. for copying files or to transparently use your favourite graphical text editor on the local computer for editing files on the remote cluster. -* Utilize screen and tmux to preserve a session between logins: - * Creation of a session. - * Detaching from the current session. - * Resuming a previous session. diff --git a/use/1/6/b.txt b/use/1/6/b.txt new file mode 100644 index 0000000..f240386 --- /dev/null +++ b/use/1/6/b.txt @@ -0,0 +1,29 @@ +# USE1.6 CLI File editors + +Running programs using the CLI often also includes editing files without a GUI available. +Many programs are available and are also often suggested in tutorials and by other people. +It is of importance to being able to navigate file editing using different editors and understanding how to write files and exit the editor. + +Most common editors will all be included here, meaning one should be taught and the other need to be mentioned for completeness: + * VI/Vim + * Emacs + * Nano + +## Requirements + +* [[skill-tree:use:1:1:b]] +* [[skill-tree:use:1:3:b]] + +## Learning Objectives + +* Define the abilities of a CLI based file editor +* Discuss what a CLI file editor needs to be able to do and how it should behave +* Demonstrate the usage of an editor to open a file in write mode and save the file +* Show how to quit an editor (relevant for all editors) +* Solve undo and redo operations to recover from changes and restore them +* Indicate how to use the mouse pointer +* Define how to copy and paste using the clipboard +* Contrast differences between available editors + * Summarize the controversy between Emacs and Vim users + + diff --git a/use/1/7/b.txt b/use/1/7/b.txt new file mode 100644 index 0000000..e94eea2 --- /dev/null +++ b/use/1/7/b.txt @@ -0,0 +1,26 @@ +# USE1.7 Terminal multiplexer + +Sometimes running longer tasks or processes interactively can become error prone on a remote system. +A loss of network breaks the SSH connection and terminates the commands a user has running on the remote system. + +This can be prevented by running terminal multiplexer. +These are programs that run on a remote system and a user can attach and detach from such a session. +All output is cached in the session and can be checked gain. +Commands that are started run in this session and are independent of the SSH connection, breaking it will only detach from the multiplexer. + +Some even allow multiple users or multiple sessions of the same user to connect to them. + +## Requirements + +* [[skill-tree:use:1:1:b]] +* [[skill-tree:use:1:4:b]] + +## Learning outcomes + +* Give examples for use cases for such a multiplexer. +* Discuss using such a session for longer data transfers using SSH. +* Review editing files using a terminal multiplexer +* Utilize screen or tmux to preserve a session between logins: + * Creation of a session. + * Detaching from the current session. + * Resuming a previous session. diff --git a/use/1/8/b.txt b/use/1/8/b.txt new file mode 100644 index 0000000..49a6d98 --- /dev/null +++ b/use/1/8/b.txt @@ -0,0 +1,23 @@ +# USE1.8 Manage background processes and signals + +Background processes are very useful to use a single bash session and run multiple programs in it. +They can either run in parallel in the background or are stopped and can be resumed later. + +Similarly, sending signals to other programs in the background can be used to change the state of the program by making it active again or move a program in to the foreground. +In order to do this there exists a program called kill, which does not only kill by signal a kill. + +## Requirements + +* [[skill-tree:use:1:1:b]] + +## Learning Outcomes + +* Understand interrupting or aborting of a program execution using CTRL-C and CTRL-Z. +* Describe the difference between SIGINT and SIGTSTP. +* Demonstrate the use of CTRL-Z in combination with the commands jobs and fg. + +* Understand what a Process ID is and how it can be used to identify any programs. +* Demonstrate how the command jobs can display the process id. +* Understand the behaviour of the kill command. +* Demonstrate the kill command and send the signals SIGKILL, SIGINT, SIGTSTP, also via the numbers instead of the names + diff --git a/use/1/b.txt b/use/1/b.txt index 7704fd3..8f90928 100644 --- a/use/1/b.txt +++ b/use/1/b.txt @@ -15,6 +15,13 @@ While there are many similarities to single-user Linux systems, HPC systems diff * Understand terminal multiplexers and use them to run longer commands without keeping a connection alive. * Utilize tools to transfer data between a desktop/laptop system and a remote HPC system. * Utilize package management tools that provide access to a wide variety of software. +* Demonstrate the usage of an editor to open a file in write mode and save the file and define why CLI based editors are useful in an HPC environment. +* Utilize screen or tmux to preserve a session between logins and classify usecases for these three operations: + * Creation of a session. + * Detaching from the current session. + * Resuming a previous session. +* Illustrate the use of CTRL-Z and CTRL-C in combination with the commands jobs and fg to send the signals SIGINT and SIGTSTP. +* Experiment with the kill command and send the signals SIGKILL, SIGINT, SIGTSTP, also via the numbers instead of the names to a specific process id ## Subskills @@ -23,3 +30,6 @@ While there are many similarities to single-user Linux systems, HPC systems diff * [[skill-tree:use:1:3:b]] * [[skill-tree:use:1:4:b]] * [[skill-tree:use:1:5:b]] +* [[skill-tree:use:1:6:b]] +* [[skill-tree:use:1:7:b]] +* [[skill-tree:use:1:8:b]] diff --git a/use/b.txt b/use/b.txt index d2d0742..509d1a7 100644 --- a/use/b.txt +++ b/use/b.txt @@ -11,6 +11,7 @@ Various user roles are covered as part of this subtree: practitioners that aim t ## Learning Outcomes * Apply tools provided by the operating system to navigate and manage files and executables. +* Explain what programs and processes are and how the CLI interacts with and manages them. * Use a workload manager to allocate HPC resources and run job using scripts. * Select the software environment to build existing OpenSource projects * Develop novel parallel applications effectively.