Commit 824c7edd authored by Mihai's avatar Mihai

Split core into two parts.

parent a413334c
......@@ -9,6 +9,9 @@
\usepackage[utf8]{inputenc}
\pagenumbering{arabic}
\usepackage{multicol}
\usepackage{enumitem}
\newcommand\cleartooddpage{\clearpage
\ifodd\value{page}\else\null\clearpage\fi}
......@@ -70,18 +73,19 @@ Learning outcomes:
\item Connect to other computers.
\end{itemize}
The entire course material is available online at the following address:\\
\url{https://git.lumc.nl/courses/practical-linux-course}
\subsection*{Important}
In the following pages you will find the practical handouts for this course.
The provided credentials should be used during the practicals to connect to
the remote machine. In order to log in to the machines present in this room
utilize your LUMC account. To log in to the provided laptops use the account
information present on them. Please note that the last part of this booklet
consists of a command cheat sheet which could be of great help during the
practicals.
\begin{itemize}
\item In order to log in to the machines present in the room utilize your LUMC account.
\item If you do not have an LUMC account ask for a laptop.
\item To log in to the provided laptops use the account information present on them.
\item The provided credentials should be used during the practicals to connect to the remote machine.
\item In the following pages you will find the practical handouts for this course.
\item \textbf{Please note that the last part of this booklet consists of a command cheat sheet which is of great help during the practicals.}
\end{itemize}
The entire course material is available online at the following address:\\
\url{https://git.lumc.nl/courses/practical-linux-course}
\clearpage
......@@ -99,17 +103,28 @@ practicals.
\begin{center}
{\bf Practical 2}\\
\medskip
Core
Core 1
\end{center}
\bigskip
\input{../core/handouts_core_content}
\input{../core1/handouts_core1_content}
\clearpage
\begin{center}
{\bf Practical 3}\\
\medskip
Core 2
\end{center}
\bigskip
\input{../core2/handouts_core2_content}
\clearpage
\begin{center}
{\bf Practical 4}\\
\medskip
User Environment
\end{center}
\bigskip
......
This diff is collapsed.
\documentclass{article}
\usepackage{graphicx}
\usepackage[hidelinks]{hyperref}
\providecommand{\handoutsTitle }{\vspace{0.5cm}Practical 2 \\ \vspace{0.5cm}Core 1}
\usepackage{../shared/handouts}
\usepackage{multicol}
\usepackage{enumitem}
\input{../shared/shared}
\begin{document}
\makeHeader
\input{handouts_core1_content}
% Make it such that the first line of their file contains a name for the file to rename to.
% Ask them to rename that file.
% Make it such that their last line contains a text with a new name.
% Make them rename another file like that.
% Make such that if they search for a specific string in a file they get some text which they have to use for something else.
% The files should be some genbank or other files.
% They can also delete some file getting the name through some sort of a game.
% They should also edit some files based on some other strings.
% Maybe also edit some scripts which later they will run to get some real thing. :)
\end{document}
\subsection*{General questions}
\begin{enumerate}
\item In Linux everything is stored as:
\begin{multicols}{3}
\begin{enumerate}[label=(\alph*)]
\item an apple
\item a directory
\item an image
\item a file
\item an executable
\item none of the above
\end{enumerate}
\end{multicols}
\item An absolute path is:
\begin{enumerate}[label=(\alph*)]
\item The path to the root directory from the current (working) directory.
\item The path of a file system object (i.e., file, directory or link) relative to the root directory.
\item The path to an important file which is part of the Linux system.
\item The path of a file system object relative to the current (working) directory.
\end{enumerate}
\item A shell is:
\begin{multicols}{3}
\begin{enumerate}[label=(\alph*)]
\item an oil and gas company
\item a command line interpreter
\item an animal's hard outer layer
\item a manipulation command
\item an image viewer
\item none of the above
\end{enumerate}
\end{multicols}
\item Which keys combination is generally used to exit from a terminal?
\begin{multicols}{3}
\begin{enumerate}[label=(\alph*)]
\item Ctrl-c
\item Ctrl-d
\item Esc-Ctrl
\item Ctr-t
\item Alt-F1
\item Shift-Esc
\end{enumerate}
\end{multicols}
\end{enumerate}
\subsection*{Moving around}
Make sure that you are connected to the \textbf{education server}.
\begin{enumerate}
\item What can you identify from the prompt?
\begin{multicols}{3}
\begin{itemize}
\item[[ ]] Your name.
\item[[ ]] Your username.
\item[[ ]] Your family name.
\item[[ ]] Host name.
\item[[ ]] Your password.
\item[[ ]] Your address.
\end{itemize}
\end{multicols}
\item What is the absolute path of your current (working) directory? \\
\item Navigate to the \textbf{root} directory, i.e., change your working directory to be the root directory.
\item Print the \textbf{content} of the root directory.
\item Navigate to your \textbf{home} directory.
\item How many files and directories are in your \textbf{home} directory? \\
\item Check if the content of your \textbf{home} directory resembles the file tree structure from Figure~\ref{initial_tree} and indicate on the paper the extra files/directories. Make sure you use the auto-completion option.
\end{enumerate}
\begin{figure}[!h]
\centering
\includegraphics[width=\textwidth]{../images/core_practical_file_tree.pdf}
\caption{Initial home directory tree?}
\label{initial_tree}
\end{figure}
\begin{enumerate}
\setcounter{enumi}{7}
\item Assuming your current working directory is \textbf{project\_x}, what command could you issue to change your working directory to \textbf{unimportant}?\\
\item What is the \textbf{lost\_orchid} file absolute path? \\
\item Can you get an estimation on how many users have an account on this machine? \\
\item Navigate through the previously executed commands.
\end{enumerate}
Congratulations, you have finished this practical session!
\ No newline at end of file
This diff is collapsed.
\documentclass{article}
\usepackage{graphicx}
\usepackage[hidelinks]{hyperref}
\providecommand{\handoutsTitle }{\vspace{0.5cm}Practical 2 \\ \vspace{0.5cm}Core 2}
\usepackage{../shared/handouts}
\input{../shared/shared}
\begin{document}
\makeHeader
\input{handouts_core2_content}
% Make it such that the first line of their file contains a name for the file to rename to.
% Ask them to rename that file.
% Make it such that their last line contains a text with a new name.
% Make them rename another file like that.
% Make such that if they search for a specific string in a file they get some text which they have to use for something else.
% The files should be some genbank or other files.
% They can also delete some file getting the name through some sort of a game.
% They should also edit some files based on some other strings.
% Maybe also edit some scripts which later they will run to get some real thing. :)
\end{document}
\subsection*{Setup}
Make sure that you are connected to the \textbf{education server}.\\
Check the steps from the \textbf{connecting} practical session for help.
\medskip
\subsection*{Creating and working with directories and files}
Make sure that your \textbf{working} directory is your \textbf{home} directory. (\textcolor{command-color}{\lstinline{pwd, cd}})
Run a sequence of commands to make your \textbf{home} directory tree look as in Figure~\ref{initial_tree_01}.
This will include:
\begin{itemize}
\item Rename the \textbf{project\_x} directory to \textbf{project\_genetics}. (\textcolor{command-color}{\lstinline{mv}})
% \item Check that the renaming was performed. (\textcolor{command-color}{\lstinline{ls}})
\item Create three \textbf{new directories} inside the ``\textbf{project genetics}'' named: ``\textbf{data}'', ``\textbf{src}'', ``\textbf{doc}''. (\textcolor{command-color}{\lstinline{mkdir}})
\item Move the \textbf{script.sh} file inside the \textbf{project\_genetics/src} directory. (\textcolor{command-color}{\lstinline{mv}})
\item Move all the \textbf{.gb} files from \textbf{project\_genetics} inside the \textbf{project\_genetics/data} directory. (\textcolor{command-color}{\lstinline{mv, *}})
\item Make a copy of the \textbf{project\_genetics/README.md} inside \textbf{project\_genetics/doc}. (\textcolor{command-color}{\lstinline{cp}})
\end{itemize}
\begin{figure}[!h]
\centering
\includegraphics[width=\textwidth]{../images/core_practical_file_tree_01.pdf}
\caption{Home directory tree}
\label{initial_tree_01}
\end{figure}
Remove the \textbf{project\_genetics/uninportant} directory. (\textcolor{command-color}{\lstinline{rm}})
\subsection*{Inspect, edit, and search}
\begin{itemize}
\item Print the \textbf{project\_genetics/README.md} file contents. (\textcolor{command-color}{\lstinline{cat}})
\vspace{-0.1cm}
\item Open the \textbf{project\_genetics/README.md} file with \textcolor{command-color}{\lstinline{nano}} and edit it according to what it is mentioned inside it. (make use of key combinations in \textcolor{command-color}{\lstinline{nano}}, e.g., \textcolor{command-color}{\lstinline{Ctrl-k, Ctrl-x, ...}}; see cheat sheet)
\vspace{-0.6cm}
\item Print again the \textbf{project\_genetics/README.md} file content to check the changes. (\textcolor{command-color}{\lstinline{cat}})
\vspace{-0.1cm}
\item Inspect the \textbf{project\_genetics/data/orchids.gb} file content first with the \textcolor{command-color}{\lstinline{cat}} command and after that with the \textcolor{command-color}{\lstinline{less}} command in order to see the differences between the two commands.
\vspace{-0.1cm}
\item Search for the appearences of \textbf{LOCUS} within the \textbf{project\_genetics/data/orchids.gb}. (\textcolor{command-color}{\lstinline{grep}})
\vspace{-0.1cm}
\item Search for the appearences of \textbf{ORGANISM} within all the \textbf{.gb} files in the \textbf{project\_genetics/data} directory. (\textcolor{command-color}{\lstinline{grep, *}})
\vspace{-0.1cm}
\item Open the \textbf{manual} page of \textbf{grep} and search for the \textbf{option} on how to \textbf{suppress the prefixing of file names on output}. (\textcolor{command-color}{\lstinline{man}}; use the \textcolor{command-color}{\lstinline{/}} key to search for keywords inside the manual page)
\vspace{-0.1cm}
\item Make use of the previous \textbf{grep} command found \textbf{option} in the search for the appearences of \textbf{ORGANISM} within the all \textbf{.gb} files in \textbf{project\_genetics/data}.
\vspace{-0.1cm}
\item Rerun the previous command and redirect its output to a file named \textbf{organisms.txt} inside the \textbf{project\_genetics/data} directory. (\textcolor{command-color}{\lstinline{grep, *, >}})
\vspace{-0.1cm}
\item Check the content of the newly \textbf{organisms.txt} created file. (\textcolor{command-color}{\lstinline{cat}} or \textcolor{command-color}{\lstinline{less}})
\vspace{-0.1cm}
\item Make sure that your current directory is \textbf{project\_genetics/data} and run the \textbf{project\_genetics/src/script.sh} script.
A new file \textbf{lost\_orchid.gb} should appear now in the \textbf{project\_genetics/data} directory.
\vspace{-0.1cm}
\item Append the contents of \textbf{lost\_orchid.gb} to the \textbf{orchids.gb} file. (\textcolor{command-color}{\lstinline{cat, >>}})
\vspace{-0.1cm}
\item Remove the \textbf{lost\_orchid.gb} file. (\textcolor{command-color}{\lstinline{rm}})
\vspace{-0.1cm}
\item Print the first three organisms from the \textbf{organisms.txt}. (\textcolor{command-color}{\lstinline{head}})
\vspace{-0.1cm}
\item What is the total number of organisms that appear in the \textbf{organisms.txt} file? (\textcolor{command-color}{\lstinline{wc}})
\vspace{-0.1cm}
\item What is the disk usage of the data folder? (\textcolor{command-color}{\lstinline{du}})
\end{itemize}
Congratulations, you have finished this practical session!
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment