\documentclass[10pt]{article}
\usepackage{amsmath}
\usepackage{graphicx}
\author{\bf Biala Toheeb A.}
\title{\bf COMS 6100 Class note }
\date{ 26 August, 2016}
\begin{document}
	\maketitle
A short quiz was given to test if the students really studied the linux commands. The answers to the quiz are
\begin{enumerate}
	\item[Q1.] How do you create a directory named researchData?
	\item[A1.] mkdir researchData
	\item[Q2.] How do you delete an empty directory named researchData?
	\item[A2.] rmdir researchData
	\item[Q3.] How do you display information about what a command is and the different parameters that it will take?
	\item[A3.] man "command"
	\item[Q4.] How do you display information about what a command is, the different parameters that it will take, the history of the command, examples, ets.?
	\item[A4.] "command" - -help
	\item[Q5.] How do you display the contents of the current directory?
	\item[A5.] ls
	\item[Q6.] How do you duplicate file1 as file2?
	\item[A6.] cp file1 file2
	\item[Q7.] How do you make a directory named researchData the current directory (if researchData is in your current directory)?
	\item[A7.] cd researchData
	\item[Q8.] How do you rename a file named currentIdeas.txt to OldIdeas.txt?
	\item[A8.] mv currentIdeas.txt OldIdeas.txt
	\item[Q9.] How do you update the timestamp of a file named dissertationTopics.txt?
	\item[A9.] touch dissertationTopics.txt
	\item[Q10.] How do you wreak havoc and delete all files and directories that are in the current directory?
	\item[A10.] rm -f *
\end{enumerate}
After the quiz, a brief introduction of how the Linux operating system works  (by distinguishing the graphical user interface and the terminal) was given by Dr. Carroll. The lecture is given in two parts.\\

\section{Linux Commands}
The following Linux commands are discussed:
\begin{enumerate}
	\item man: This command shows the information and instructions on how a command is used. For example typing "man cd" in the terminal gives the information about the command "cd".
	\item ls: This command is a short name for list directory. It is used to list the files and directories present in the current working directory. The syntax is "ls [option]". Some of the options used with the "ls" command include:
	\begin{itemize}
		\item -a: list all files and directories (including hidden files and directories) in the current working directory.
		\item -l: list all files and directories with their modification date and time. It also shows permission (of owner, group or other users) to read, execute or write on the files and directories. Also it gives a number named  "total" which is the number of blocks which all the files and directories take up on the disk and this number is dependent on the operating system of the computer.
		\item -al: This has the same  function as the previous option  except that all hidden files and directories are included.
		\item -s: list by sorting files and directories by size.
		\item -t: list by sorting files and directories by date and time.
		\item -X: list by sorting all files and directories by extension name
	\end{itemize}
	\item cd: This command means change directory. It moves the user from a current working directory to the named directory. The syntax is "cd nameOfDirectory". For example "cd researchData/BiologyExperiments" (assuming BiologyExperiments is a directory in researchData directory which in turn is in  the home directory and the user is currently  in the home directory). The commands "cd" and "cd \textasciitilde" can be used to return to the home directory from any working directory. While the command "cd \textbf{.}" denotes staying in the current directory, the command "cd \textbf{..}" is used to return to the parent directory of the current working directory.
	\item touch: The "touch" command is majorly used to update the timestamp (date and time of the recent access and modification) of a file or directory and does not automatically erase the contents of existing files/directories with the same name. It is also used to create a new file. The syntax is "touch [options] fileName (or directoryName)". The various options include:
	\begin{itemize}
		\item -a: changes only the access time of the file or directory.
		\item -m: changes only the modification time of the file or directory.
		\item -am: changes both the access and modification time.
		\item -d: gives the option of creating a date of your choice. The "-d (option)" is followed by a string (the date) in single quotes. For example, touch -d "16 May 2016" researchData.
	\end{itemize}
		\item cp: This command is a short name for copy and is used to duplicate files and directories without erasing the content of the files. However, if the files have the same name the contents of the copied file is overwritten to the new file. The syntax of the command is "cp file newFile".
	\item mv: This command is a short name for "move"  and is used to rename or move files and directories. The syntax is "mv fileName newFileName". The command "mv * /home/researchData" will move all files and directories in the current working directory (including its contents) to /home/researchData.
	\item rm: This is used to delete files and directories (with option -R for directories). Th syntax is "rm [options] fileName". Its opitions include:
	\begin{itemize}
		\item -R: used to delete directories.
		\item -f: force to remove files (-Rf for dircetories) whether the file is write-protected or not.
		\item -i: prompts the user for confirmation before deleting the files and directories.
	\end{itemize}
	The command "rm *" is used to delete all files and directories in the current working directory.
	\item mkdir: This command is a short name for make directory and is used to create directories. If a directory name already exists an error message "cannot create directory 'xxx': File exists" is printed. The syntax is "mkdir directoryName".
	\item rmdir: This is a short name for remove directory. It used to remove only empty directories and will print an error message if used to remove a directory with contents.
	\item cat: The "cat" command is short for concatenation. It is used to read/display the contents of a file on the screen. The  command "cat {\textgreater}  fileName" is used to create and write in a new file named "fileName". For existing files with contents (say MathLab), the command "cat {\textgreater {\textgreater} }  MatLab" allows the user to write in MatLab. The command "cat file1 file2 file3" displays the contents of file1, file2 and file3 successively on the monitor.
	\item more: This prints the content of a file one page (on the monitor) at a time. The tab key is used to view more contents.
	\item less: This has the same function as the "more" command except that it allows scrolling backward through the file.
	\item pwd: This command is a short name for print working directory. It prints the full path name of the current working directory. 
	\item *: This is a wild card character. It denotes everything in the current working directory. For example, "rm *" and "more *" removes and displays (respectively) all files and directories in the current working directory.
	\item ! \{command\}: This executes the last use of the command "command". For example "! ls" displays the directories of the directory for which "ls" was last used.
	\item !\$: displays the last parameter on the previous line. If the last parameter is a command, it is displayed as well as executed.
	\item which: This gives the pathname  of a command.
	\item echo: displays a line of text. 
	\item Useful Keys: some useful keys were discussed which includes:
	\begin{itemize}
		\item Up and Down Keys: Goes to previous or next command already typed on the terminal. It serves as a short cut to avoid typing long strings over and over again.
		\item Tab Key: This is used to complete a parameter in the terminal provided the parameter has been typed in previous commands.
		The asterisk * followed by a character(s) and then * will print files and directories whose names include the character(s). For example ls *i* will list all files and directories whose name includes i.
	\end{itemize}
Additional information on the Linux Commands  can be found on Dr. Carroll's slides located at: \\
https://www.cs.mtsu.edu/ hcarroll/6100/lectures/linuxCommands1/linuxCommands1.pdf
	\end{enumerate}

\section{ \LaTeX}
A brief introduction on how {\LaTeX}    differs from other word processing softwares was given and the emphasis were on the formatting, layout, visual display and the professionalism of the output given by {\LaTeX}. 
\subsection{{\LaTeX} Definition} 
The following are some given {\LaTeX} definitions:
\begin{itemize}
	\item {\LaTeX} is a document markup language and document preparation system for \TeX.
	\item Essentially a language consisting of macros for \TeX.
	\item It is an excellent tool for writing scientific and mathematical papers.
\end{itemize}
\subsection{Features of \LaTeX}
Some features of {\LaTeX} were given and these includes:
\begin{itemize}
	\item  Typesetting journal articles, letters, technical reports, books, and slide
	presentations.
	\item Automatically numbers chapters, sections, subsections, equations, tables, figures etc. In essence it has a complete control over one's document.
	\item The most basic feature of {\LaTeX} is in the typesetting of complex mathematical formulas, symbols and equations.
	\item Gives control over the choice of width and height of tables and figures.
	\item Automatic generation of bibliographies and indexes.
	\item Multi-lingual typesetting.
	\item Inclusion of artwork and process.
	\item creates a well formatted device independent (DVI) output and allows the output to be converted to other file format.
\end{itemize}
\subsection{A Brief History of \LaTeX}
In 1977, Donald E. Knuth developed the {\TeX} for typesetting text and mathematical formulas while the {\LaTeX} was developed by Leslie Lamport in the early 1980s and pronounced "Lah-tech" or "Lay-tech". For more information, Dr. Carroll referred the students to the book "The Not so Short Introduction to \LaTeXe" by Tobias Oetiker.\\
In writing a book in \LaTeX, the author writes the content, the book designer designs the layout  and the typesetter typsets the book.
\section{Structure}
{\LaTeX} processes input files with a certain structure. The structure must follow\\
\\
\fbox{\begin{minipage}{6cm}
\textbackslash documentclass[options]\{...\}\\
\textbackslash begin\{document\}\\
.............................\\
	\textbackslash end\{document\}\\
	\end{minipage}}\\
	\\
The different documentclass options include the font (10pt, 11pt, 12pt) and the size (a4, a5, a6, etc) while the three dots denote the document type you which to write (article, book, letter, report, slides, memoir, beamer etc). Example of a {\LaTeX} input is:\\
\\
\fbox{\begin{minipage}{12cm}
		\textbackslash documentclass[11pt]\{article\}\\
		\textbackslash title\{My First \textbackslash LaTeX Typing\}\\
		\textbackslash author\{Biala Toheeb A.\}\\
		\textbackslash date\{\textbackslash today\}\\
		\textbackslash begin\{document\}\\
		 H\textbackslash ' \{e\}llo \{\textbackslash bf Word!\}	\textbackslash	\textbackslash\\
		 The  heat equation in two dimension is given as\\
		\textbackslash begin\{equation*\}\\
		\textbackslash dfrac\{\textbackslash partial u\}\{\textbackslash partial t\} - \textbackslash kappa \textbackslash left(\textbackslash dfrac\{\textbackslash partial u\string^2\}\{\textbackslash partial \string^2 x\} + \textbackslash dfrac\{\textbackslash partial u \string^2\}\{\textbackslash partial \string^2 y\}\textbackslash right) = 0\\
		\textbackslash end\{equation*\}\\
		\textbackslash end\{document\}\\
	\end{minipage}} \\
	\\
	{\bf Output:} \\
\fbox{\begin{minipage}{12cm}	\begin{center}
		{\LARGE My First \LaTeX Typing}\\
		
		{\large Biala Toheeb A.}\\
		
	{\small	26th August, 2016.}
		\end{center}
 H\'{e}llo {\bf World!}\\
	The heat equation in two dimensions is given as 
	\begin{equation*}
	\dfrac{\partial u}{\partial t} - \kappa \left(\dfrac{\partial u^2}{\partial ^2x} + \dfrac{\partial u^2}{\partial ^2 y}\right) = 0
	\end{equation*}
	\end{minipage}}\\
	\\
	Several commands were also discussed which includes:
	\begin{itemize}
		\item \textbackslash part\{...\}: Used in all document class except letters
		\item \textbackslash chapter\{...\}: Used only in books and  reports
		\item \textbackslash subsection\{...\}: Used in all document class except letters
		\item \textbackslash subsubsection\{...\}: Used in all document class except letters
		\item \textbackslash paragraph\{...\}: Used in all document class except letters
		\item \textbackslash subparagraph\{...\}: Used in all document class except letters
		\item \textbackslash begin\{itemize\}\\
		\textbackslash item ...\\
		\textbackslash item ...\\
		\textbackslash end\{itemize\}:
		This is used to list items with bullet pointdots.
		\item \textbackslash begin\{enumerate\}\\
		\textbackslash item ...\\
		\textbackslash item ...\\
		\textbackslash end\{enumerate\}:
		This is used to list items with numberings.
		\item 	\textbackslash begin\{equation\} ... 	\textbackslash end\{equation\} or \$...\$: They are used to write mathematical formulas, symbols and equations. While the former command  centers and numbers the equation, the latter does not.
		\item \textbackslash begin\{figure\} ... \textbackslash end\{figure\}: To insert figures in a text. For example the text\\
		\\
		\fbox{\begin{minipage}{8cm}
		 \textbackslash begin\{figure\}[h]\\
			 \textbackslash centering\\
			 \textbackslash includegraphics[width = 0.25 \textbackslash textwidth]\{biala\}\\
			 \textbackslash caption\{Biala and his Mum\}\\
		 \textbackslash end\{figure\}
		 \end{minipage}}\\
		 \\
		 produces the output
	\begin{figure} [h]
			\centering
			\includegraphics[width = 0.25\textwidth]{biala}
			\caption{Biala and his Mum}
		\end{figure}
		\item  \textbackslash begin\{tabular\}{...} ...  \textbackslash end \{tabular\}: Used to draw tables. For example the text \\
			\fbox{\begin{minipage}{9cm}
					\textbackslash begin\{tabular\}\{\texttt{|c|c|c}\}\textbackslash\textbackslash\\
				Students \&  Nationality \& Date of Birth \textbackslash\textbackslash \\
				\textbackslash hline \textbackslash\textbackslash \\
				Student1 \& US \& 08/26/2016\textbackslash\textbackslash \\
				Student2 \& US \& 08/26/2016 \textbackslash\textbackslash\\
				Toheeb \& Nigeria \& 08/26/2016\textbackslash\textbackslash\\
				Student4 \& China \& 08/26/2016\textbackslash\textbackslash\\			
				Student5 \& China \& 08/26/2016\textbackslash\textbackslash\\
					\textbackslash caption\{Students offering COMS 6100 in Fall 2016 \}\textbackslash\textbackslash\\
					\textbackslash end\{figure\}
				\end{minipage}}\\
				\\
		produces the output\\
		\begin{table}[ht]
			\centering
		\begin{tabular}{|c|c|c|}
			\hline
			&&\\
			Students & Nationality & Date of Birth\\
			\hline 
			Student1 & US & 08/26/2016\\
			Student2 & US & 08/26/2016\\
			Toheeb & Nigerian & 08/26/2016\\
			Student4 & China & 08/26/2016\\
			Student5 & China & 08/26/2016\\
			\hline
		\end{tabular}
		\caption{Students offering COMS 6100 in Fall 2016}
		\end{table}
	\end{itemize}
	
Further reading could be done with the book "The Not So Short Introduction to \LaTeXe: (Or {\LaTeXe} in 157 minutes) or on  Dr. Carroll's slides located at: \\
https://www.cs.mtsu.edu/ hcarroll/6100/lectures/latex/latex.pdf.

\end{document}
