From d76c40ad48fe96dd8b35e9a490013483fbafffa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vojt=C4=9Bch=20Zeisek?= Date: Wed, 1 Feb 2023 16:34:54 +0100 Subject: [PATCH] Corrections after the course. --- presentation/linux_bash_metacentrum_course.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/presentation/linux_bash_metacentrum_course.tex b/presentation/linux_bash_metacentrum_course.tex index e2866f6..5a915ab 100644 --- a/presentation/linux_bash_metacentrum_course.tex +++ b/presentation/linux_bash_metacentrum_course.tex @@ -1638,7 +1638,7 @@ \subsection{Searching} # Delete empty directories within 'doc' directory find doc/ -type d -empty -execdir rmdir '{}' \; # Copy all *.sh files from /home to ~/scripts - find /home -name "*.sh" -exec cp '{}' ~/scripts/ + find /home -name "*.sh" -exec cp '{}' ~/scripts/ \; # Search for file long_text.txt (exact name) in your home directory find ~ -name long_text.txt -type f -print # Find in current directory files from 1 to 100 MB @@ -2848,8 +2848,8 @@ \subsection{AWK} # Precede each line by its line number for all files together, with TAB # (i.e. print line number (NR) and then whole original line ($0)) awk '{print NR "\t" $0}' diff_test_file_* - # Substitute "a" with "XXX" ONLY for lines which contain "The" - awk '/The/{gsub(/a/, "XXX")}; 1' diff_test_file_1.txt + # Substitute "a" with "XXX" ONLY for lines which contain "the" + awk '/the/{gsub(/a/, "XXX")}; 1' diff_test_file_1.txt \end{bashcode} \end{frame} @@ -4233,7 +4233,7 @@ \subsection{Packages} \item Package name \texttt{*.rpm} \item \texttt{dnf install \textit{package}} --- install \textit{package} \item \texttt{dnf remove \textit{package}} --- remove \textit{package} - \item \texttt{dbf check-update} --- refresh repositories, check for updates + \item \texttt{dnf check-update} --- refresh repositories, check for updates \item \texttt{dnf upgrade} --- upgrade packages \item \texttt{dnf search \textit{term}} --- search \textit{term} \item \texttt{dnf autoremove} --- clear packages