Skip to content
Snippets Groups Projects
Commit bfd6dc11 authored by Caspar Gutsche's avatar Caspar Gutsche
Browse files

update the course

parent ed1012b7
No related branches found
No related tags found
No related merge requests found
No preview for this file type
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
} }
\title{The Console Toolkit} \title{The Console Toolkit}
\author{Jean-Claude Graf} \author{Caspar Gutsche}
\institute{TheAlternative, ETH Zürich} \institute{TheAlternative, ETH Zürich}
\date{11. October 2023} \date{10. April 2024}
\begin{document} \begin{document}
\begin{frame} \begin{frame}
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
\begin{itemize} \begin{itemize}
\item Files \item Files
\item Directories (or ``folders'') \item Directories (or ``folders'')
\item Storage devices \item Storage devices \texttt{}
\item Keyboards \item Keyboards
\end{itemize} \end{itemize}
\column{0.5\textwidth} \column{0.5\textwidth}
...@@ -331,7 +331,7 @@ drwxr-xr-x 2 alice alice 4.0K Sep 3 23:27 Downloads ...@@ -331,7 +331,7 @@ drwxr-xr-x 2 alice alice 4.0K Sep 3 23:27 Downloads
\begin{frame}[t,fragile]{Getting Help} \begin{frame}[t,fragile]{Getting Help}
\begin{itemize} \begin{itemize}
\item Where can I find out what options are available? \item Where can I find out what options are available?
\item Two Ways: \item Three Ways:
\begin{itemize} \begin{itemize}
\item \verb+--help+ option \item \verb+--help+ option
\begin{itemize} \begin{itemize}
...@@ -341,6 +341,10 @@ drwxr-xr-x 2 alice alice 4.0K Sep 3 23:27 Downloads ...@@ -341,6 +341,10 @@ drwxr-xr-x 2 alice alice 4.0K Sep 3 23:27 Downloads
\begin{itemize} \begin{itemize}
\item E.g. \verb+man ls+ \item E.g. \verb+man ls+
\end{itemize} \end{itemize}
\item Too Long; Didn't Read
\begin{itemize}
\item Eg. \verb+tldr ls+
\end{itemize}
\end{itemize} \end{itemize}
\item (Bonus) Shell Completion \item (Bonus) Shell Completion
\end{itemize} \end{itemize}
...@@ -626,7 +630,7 @@ lrwxrwxrwx 1 root root 7 Dec 7 03:41 lib -> usr/lib ...@@ -626,7 +630,7 @@ lrwxrwxrwx 1 root root 7 Dec 7 03:41 lib -> usr/lib
\begin{frame}[t,fragile]{Changing permissions} \begin{frame}[t,fragile]{Changing permissions}
\begin{itemize} \begin{itemize}
\item Change permission: \verb$chmod {u,g,a}{+,-}{r,w,x} file$ \item Change permission: \verb$chmod {u,g,o,a}{+,-}{r,w,x} file$
\item Change user/group: \verb$chown OWNER:GROUP file$ \item Change user/group: \verb$chown OWNER:GROUP file$
\end{itemize} \end{itemize}
\SU{alice} \SU{alice}
...@@ -638,24 +642,24 @@ chown alice:alice file.txt ...@@ -638,24 +642,24 @@ chown alice:alice file.txt
\end{shell} \end{shell}
\end{frame} \end{frame}
\begin{frame}[t,fragile]{Octal Permissions} % \begin{frame}[t,fragile]{Octal Permissions}
\begin{itemize} % \begin{itemize}
\item Change permission: \verb+chmod OCTALMODE file+ % \item Change permission: \verb+chmod OCTALMODE file+
\begin{itemize} % \begin{itemize}
\item \texttt{4: read} % \item \texttt{4: read}
\item \texttt{2: write} % \item \texttt{2: write}
\item \texttt{1: execute} % \item \texttt{1: execute}
\end{itemize} % \end{itemize}
\item Octal representation allows setting all permissions in one go % \item Octal representation allows setting all permissions in one go
\item Desired permissions are added up % \item Desired permissions are added up
\iexa{} \texttt{7 = read + write + execute} % \iexa{} \texttt{7 = read + write + execute}
\end{itemize} % \end{itemize}
\SU{bob} % \SU{bob}
\begin{shell} % \begin{shell}
chmod 776 program.sh % chmod 776 program.sh
chmod 774 program.sh % chmod 774 program.sh
\end{shell} % \end{shell}
\end{frame} % \end{frame}
\section{Efficiency} \section{Efficiency}
...@@ -674,6 +678,7 @@ chmod 774 program.sh ...@@ -674,6 +678,7 @@ chmod 774 program.sh
\begin{itemize} \begin{itemize}
\item Scroll up in your command history by pressing the \keys{\arrowkeyup} key \item Scroll up in your command history by pressing the \keys{\arrowkeyup} key
\item Press \keys{\ctrl} + \keys{r} to search the history \item Press \keys{\ctrl} + \keys{r} to search the history
\item \verb+history <n>+ lets you look at the last n entries of the history (-n) in zsh
\end{itemize} \end{itemize}
\end{frame} \end{frame}
...@@ -707,6 +712,11 @@ rm {*.doc,*.docx} ...@@ -707,6 +712,11 @@ rm {*.doc,*.docx}
\begin{itemize} \begin{itemize}
\item Run next command iff current succeeds: \texttt{\&\&} \item Run next command iff current succeeds: \texttt{\&\&}
\item Run next command in any case: \texttt{;} \item Run next command in any case: \texttt{;}
\item Run in Background \texttt{\&}
\begin{itemize}
\item To run any process in background use \keys{CTRL} + \keys{z}
\item to get it back into forground use \texttt{fg}
\end{itemize}
\item Pass stdout to stdin: \texttt{|} \item Pass stdout to stdin: \texttt{|}
\begin{itemize} \begin{itemize}
\item More on that later \item More on that later
...@@ -1103,6 +1113,18 @@ sudo dnf update ...@@ -1103,6 +1113,18 @@ sudo dnf update
\end{columns} \end{columns}
\end{frame} \end{frame}
\begin{frame}[t,fragile]{Uninstalling Packages}
Debian, Ubuntu
\begin{shellcomp}
sudp apt purge
\end{shellcomp}
Arch
\begin{shellcomp}
sudo pacman -Rsn
\end{shellcomp}
\end{frame}
\begin{frame}[t,fragile]{Building From Source} \begin{frame}[t,fragile]{Building From Source}
\begin{itemize} \begin{itemize}
\item Sometimes software is unavailable in the repositories \item Sometimes software is unavailable in the repositories
...@@ -1204,16 +1226,6 @@ git push ...@@ -1204,16 +1226,6 @@ git push
\end{columns} \end{columns}
\end{frame} \end{frame}
\begin{frame}[t,fragile]{Sharing a Repository}
\begin{itemize}
\item You can use services like \emph{Github} or \emph{Gitlab} to collaborate with others on your project
\item Or host your repositories yourself!
\begin{itemize}
\item You can pull from/push to any server you can access via SSH
\end{itemize}
\end{itemize}
\end{frame}
\section{Backup} \section{Backup}
\begin{frame}[t,fragile]{Backup} \begin{frame}[t,fragile]{Backup}
\begin{itemize} \begin{itemize}
...@@ -1281,6 +1293,7 @@ rsync_tmbackup.sh ~/ alice@homeserver:~/Backup/ ~/rsync_exclude_list ...@@ -1281,6 +1293,7 @@ rsync_tmbackup.sh ~/ alice@homeserver:~/Backup/ ~/rsync_exclude_list
\item \verb+du -d 1 -h+ \item \verb+du -d 1 -h+
\item \verb_for f in *.md; do echo pandoc -o $(basename $f .md).pdf $f; done_ \item \verb_for f in *.md; do echo pandoc -o $(basename $f .md).pdf $f; done_
\item \verb+find -type l -iname "*.cr3" | wc -l+ \item \verb+find -type l -iname "*.cr3" | wc -l+
\item \verb+convert <input.jpg> -define jpeg:extent=512kb newimage.jpg+
\end{itemize} \end{itemize}
\end{frame} \end{frame}
% \begin{frame}[t,fragile] % \begin{frame}[t,fragile]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment