Skip to content
Snippets Groups Projects
Commit b5be7560 authored by Adrien Crovato's avatar Adrien Crovato
Browse files

Add notes to filesystem

parent 2b4bb43b
Branches adri
No related tags found
No related merge requests found
......@@ -42,6 +42,12 @@
\item Path
\end{itemize}
\note[item]{The file system is hierarchical: data is organized following a tree structure.}
\note[item]{A directory is an object able to contain other directories and files (e.g., \lst{Master1\_ADP}).}
\note[item]{A file is an object that can contain data (e.g., \lst{compute\_wing.m}). A file is identified by its name, and the data it contains is organized using a given format. To help a user to readily identify the format, the filename is usually given a extension, but the extension does not define the format.}
\note[item]{A link is special type of file that points to another file or even to a directory (e.g., \lst{matlab.lnk} points to \lst{matlab.exe}).}
\note[item]{A path defines the location of an object (e.g. \lst{C:/Program Files/MATLAB/matlab.exe}). They can be absolute and start from the root of the file system, or relative and start from the current location in the data tree. Note that path format depends on operating system (mainly separators).}
\end{columns}
\end{frame}
......@@ -51,7 +57,7 @@
\framesubtitle{\insertsubsectionhead}
Environment variable
\begin{itemize}
\item System-wise variable used to affect the way a process (program) runs.
\item Pair of name/value that affects the way a process (program) behaves.
\end{itemize}
When developing, the most important one is often the \lst{PATH} variable.
\begin{itemize}
......@@ -64,8 +70,8 @@ export PATH=/usr/bin:/usr/local/bin
\end{lstlisting}
\end{itemize}
\note[item]{Environment variables can technically be system-wise or user-wise.}
\note[item]{Common usual environment variables are: \lst{PATH}, \lst{USER},
\note[item]{Environment variables can be defined system-wide or per user.}
\note[item]{Common environment variables are: \lst{PATH}, \lst{USER},
\lst{TMPDIR}, \lst{HOME}, \lst{TERMINAL}, \lst{LANG}, etc.}
\end{frame}
......@@ -100,8 +106,8 @@ addpath(genpath('.')
\end{frame}
\subsection{GUI \latin{vs} Terminal}
\label{sec:fs:gui}
\subsection{Browsing}
\label{sec:fs:browse}
\begin{frame}[fragile]{\insertsectionhead}
\framesubtitle{\insertsubsectionhead}
......@@ -110,11 +116,15 @@ addpath(genpath('.')
\includegraphics[width=0.99\columnwidth]{termgui.png}
\column{0.25\textwidth}
%\begin{itemize}
% \item Environment variables
% \item Terminal vs. GUI
%\end{itemize}
\begin{itemize}
\item GUI
\item Terminal
\end{itemize}
\end{columns}
\note[item]{The file system can be browsed using the graphical user interface or a terminal. Commands must be used to navigate the files using a terminal. On UNIX-based systems, \lst{cd} changes the directory, \lst{mkdir} creates a directory, and \lst{rm} removes a file or a directory.}
\note[item]{Environment variables are inherited when opening a terminal session. The variables defined during the session are local and will disappear when the session is closed. }
\end{frame}
......@@ -128,13 +138,17 @@ addpath(genpath('.')
C:\\Program\ Files\\MATLAB\\matlab.exe compute_wing.m
\end{lstlisting}
\item Configure environment
\item Configure environment for a process through
\begin{itemize}
\item install
\item scripts (configuration, run, ...)
\item install procedure
\item scripts
\end{itemize}
\end{itemize}
\vfill
\note[item]{A process is usually executed using a command/arguments pair. In the given example, the command is (the path to) \lst{matlab.exe} and the argument is (the path to) the script file \lst{compute\_wing}.}
\note[item]{The environment must always be configured properly before a process can be executed. This is done either by installing the software to default locations, or by using scripts that modify the environment permanently or temporarily. For example, on windows, \matlab is usually installed in \lst{Program Files} which is in the variable \lst{PATH} by default, so that it can be called from anywhere in the file system.}
\end{frame}
\subsection{Example}
......@@ -177,4 +191,6 @@ $C:\Users\Thomas\Documents\Work\ADP> my_aircraft.m
\end{lstlisting}
\note[item]{In the present example, the data tree on the left is similar to what can be found on any Windows computer, and contains \matlab installed at the default location. The tree on the right has been customized by the user \lst{Thomas} according to his needs. It contains a directory \lst{Codes}, where he placed the several libraries that he developed, and a directory \lst{Work}, where he placed the scripts that actually call the library and use them to compute data for the relevant projects. This data structure allows to make a clear difference between 1) the stable software developed by external organizations, 2) the codes or libraries developed by the user, and 3) the script and the results related to a project. The set of three commands provided in the example allows to execute the script \lst{my\_aircraft.m} according to the scenario described above.}
\end{frame}
  • Author Developer

    @thlamb Maybe it would be best to swap the slides "Environment - MATLAB" and "Browsing". I leave that at your discretion.

  • Owner

    I'd rather not. IMO it makes sense to directly show how setting $PATH should be done in Matlab as we were just talking about environment. Realistically, no one is ever going to use Matlab from the CLI anyway, so it is more a separate point.

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