Assignment 5 manual PDF / manual (push) Successful in 47s
149 lines
5.6 KiB
TeX
149 lines
5.6 KiB
TeX
\chapter{Linux Commands}
|
|
\ChapterLabel{LinuxCommands}
|
|
\index{Linux}
|
|
\index{Linux!commands}
|
|
\index{DigitalOcean}
|
|
\index{PuTTY}
|
|
|
|
\section{Purpose}
|
|
This chapter documents the Linux command-line activities completed for
|
|
Assignment 2. The commands were executed on an Ubuntu Linux Droplet hosted
|
|
on DigitalOcean. PuTTY was used to establish a secure remote terminal
|
|
connection to the Droplet.
|
|
|
|
The activity created a controlled working directory containing text, \phantomsection\label{AcronymRef:CSV}CSV,
|
|
log, binary, directory, symbolic-link, and timestamped test artifacts. These
|
|
artifacts will be used to complete the Linux problem set.
|
|
|
|
\section{Execution Environment}
|
|
Table~\ref{Table:LinuxEnvironment} summarizes the environment used for this
|
|
activity. Passwords, private keys, and complete authentication credentials
|
|
are not included.
|
|
|
|
\begin{table}[htbp]
|
|
\centering
|
|
\caption{Linux command execution environment}
|
|
\label{Table:LinuxEnvironment}
|
|
\begin{tabularx}{\linewidth}{L{0.28\linewidth}Y}
|
|
\toprule
|
|
\textbf{Environment Item} & \textbf{Configuration} \\
|
|
\midrule
|
|
Cloud platform & DigitalOcean \\
|
|
Virtual host & Ubuntu Droplet \\
|
|
Droplet name & \texttt{ssw590-group7-droplet} \\
|
|
Droplet configuration & 1 virtual CPU, 1 GB memory, and 25 GB storage \\
|
|
Remote-access tool & PuTTY \\
|
|
Operating system & Ubuntu Linux \\
|
|
Remote user & \texttt{root} \\
|
|
Working directory & \texttt{/root/lx-test} \\
|
|
Activity status & Initial test environment successfully created \\
|
|
\bottomrule
|
|
\end{tabularx}
|
|
\end{table}
|
|
|
|
\section{Test Environment Setup}
|
|
The following instructor-provided commands were executed in the DigitalOcean
|
|
Ubuntu terminal. \phantomsection\label{AcronymRef:EE}\phantomsection\label{AcronymRef:CS} to perform the setup steps required for the problem set. These commands normally produce no terminal output when they
|
|
complete successfully.
|
|
|
|
\begin{lstlisting}[language=bash,caption={Initial DigitalOcean terminal record},label={Listing:InitialTerminalRecord}]
|
|
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~#
|
|
mkdir -p ~/lx-test && cd ~/lx-test
|
|
|
|
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
|
printf "alpha\nbeta\nGamma\ngamma\nbeta\n" > words.txt
|
|
|
|
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
|
printf "id,name,dept\n1,Ada,EE\n2,Linus,CS\n3,Grace,EE\n4,Dennis,CS\n" > people.csv
|
|
|
|
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
|
printf "INFO boot ok\nWARN disk low\nERROR fan fail\nINFO shutdown\n" > sys.log
|
|
|
|
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
|
dd if=/dev/zero of=blob.bin bs=1K count=48 status=none
|
|
|
|
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
|
mkdir -p src/lib tmp archive
|
|
|
|
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
|
printf "one two three four\n" > src/file1.txt
|
|
|
|
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
|
printf "two three four five\n" > src/file2.txt
|
|
|
|
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
|
ln -s src/file1.txt link-to-file1
|
|
|
|
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
|
touch -t 202401020304 old.txt
|
|
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
|
\end{lstlisting}
|
|
|
|
\begin{comment}
|
|
\section{Created Artifacts}
|
|
The setup commands created the artifacts summarized in
|
|
Table~\ref{Table:LinuxArtifacts}.
|
|
|
|
\footnotesize
|
|
\begin{longtable}{L{0.25\linewidth}L{0.22\linewidth}L{0.42\linewidth}}
|
|
\caption{Artifacts created by the Linux setup commands}\label{Table:LinuxArtifacts}\\
|
|
\toprule
|
|
\textbf{Artifact} & \textbf{Type} & \textbf{Purpose or Contents} \\
|
|
\midrule
|
|
\endfirsthead
|
|
\multicolumn{3}{l}{\footnotesize\itshape Created Linux artifacts (continued)}\\
|
|
\toprule
|
|
\textbf{Artifact} & \textbf{Type} & \textbf{Purpose or Contents} \\
|
|
\midrule
|
|
\endhead
|
|
\bottomrule
|
|
\endlastfoot
|
|
\texttt{words.txt} & Text file & Contains mixed-case and repeated words for sorting and filtering.\\
|
|
\texttt{people.csv} & CSV file & Contains a header and four EE and CS personnel records.\\
|
|
\texttt{sys.log} & Log file & Contains INFO, WARN, and ERROR entries for searching and filtering.\\
|
|
\texttt{blob.bin} & Binary file & Contains 48 KiB of zero-valued data from \texttt{/dev/zero}.\\
|
|
\texttt{src/} & Directory & Contains two text files and the nested \texttt{lib/} directory.\\
|
|
\texttt{tmp/} & Directory & Temporary working location for later commands.\\
|
|
\texttt{archive/} & Directory & Destination for later archive operations.\\
|
|
\texttt{src/file1.txt} & Text file & Contains \texttt{one two three four}.\\
|
|
\texttt{src/file2.txt} & Text file & Contains \texttt{two three four five}.\\
|
|
\texttt{link-to-file1} & Symbolic link & Points to \texttt{src/file1.txt}.\\
|
|
\texttt{old.txt} & Timestamped file & Modification time set to January 2, 2024 at 03:04.\\
|
|
\end{longtable}
|
|
\normalsize
|
|
|
|
\section{Initial Terminal Record}
|
|
The following record reproduces the observed terminal interaction. The return
|
|
of the shell prompt without an error indicates that each silent setup command
|
|
was accepted.
|
|
|
|
|
|
|
|
\section{Verification Procedure}
|
|
The following commands will verify the working directory, created files,
|
|
directory hierarchy, symbolic link, file contents, binary size, and timestamp.
|
|
|
|
\begin{lstlisting}[language=bash,caption={Linux test-environment verification commands},label={Listing:LinuxVerificationCommands}]
|
|
pwd
|
|
ls -lah
|
|
find . -maxdepth 3 -type d | sort
|
|
cat words.txt
|
|
cat people.csv
|
|
cat sys.log
|
|
cat src/file1.txt
|
|
cat src/file2.txt
|
|
ls -l link-to-file1
|
|
cat link-to-file1
|
|
stat -c "%n: %s bytes" blob.bin
|
|
stat -c "%n: %y" old.txt
|
|
\end{lstlisting}
|
|
|
|
The observed output will be added after the team executes these verification
|
|
commands on the shared Droplet.
|
|
|
|
\section{Linux Problem Set}
|
|
The solutions to \texttt{linuxProblemSet.pdf} will be added to this section
|
|
after the problem set is reviewed. Each solution will include the executed
|
|
command, relevant output, and a concise explanation.
|
|
\end{comment}
|