diff --git a/1/ISO/assignments/t4-ej1-cmd/history.txt b/1/ISO/assignments/t4-ej1-cmd/history.txt new file mode 100644 index 0000000..6e346b7 --- /dev/null +++ b/1/ISO/assignments/t4-ej1-cmd/history.txt @@ -0,0 +1,43 @@ +cd +dir +help dir +dir \Q +dir /Q +cls +cd .. +cd +cd . +cd +cls +cd .. +cd +dir +cd F: +cls +cd E:\t4-ej1-2-cmd +cd +cls +dir E:\t4-ej1-2-cmd +cd E:\ +cls +cd /d E: +dir E:\t4-ej1-2-cmd +dir t4-ej1-2-cmd +cd /d C: +cls +tree +cls +tree Users +cls +set +cd %HOMEPATH% +cls +set ESCRITORIO=%HOMEPATH%\Desktop +set +cls +set ESCRITORIO=%HOMEPATH%\Desktop +cd %ESCRITORIO% +cd +cls +DOSKEY /h +DOSKEY /h >> E:\t4-ej1-2-cmd\history.TXT diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/00-abrir-cmd.png b/1/ISO/assignments/t4-ej1-cmd/imgs/00-abrir-cmd.png new file mode 100644 index 0000000..15e6e0b Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/00-abrir-cmd.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/01-dir.png b/1/ISO/assignments/t4-ej1-cmd/imgs/01-dir.png new file mode 100644 index 0000000..c8b1145 Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/01-dir.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/02-help-dir.png b/1/ISO/assignments/t4-ej1-cmd/imgs/02-help-dir.png new file mode 100644 index 0000000..19683a6 Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/02-help-dir.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/03-dir-q.png b/1/ISO/assignments/t4-ej1-cmd/imgs/03-dir-q.png new file mode 100644 index 0000000..be5879e Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/03-dir-q.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/04-cd.png b/1/ISO/assignments/t4-ej1-cmd/imgs/04-cd.png new file mode 100644 index 0000000..4cda830 Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/04-cd.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/05-c-drive.png b/1/ISO/assignments/t4-ej1-cmd/imgs/05-c-drive.png new file mode 100644 index 0000000..75bd599 Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/05-c-drive.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/06-relative-absolute.png b/1/ISO/assignments/t4-ej1-cmd/imgs/06-relative-absolute.png new file mode 100644 index 0000000..273df05 Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/06-relative-absolute.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/07-tree.png b/1/ISO/assignments/t4-ej1-cmd/imgs/07-tree.png new file mode 100644 index 0000000..1fe6bcf Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/07-tree.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/08-tree-users.png b/1/ISO/assignments/t4-ej1-cmd/imgs/08-tree-users.png new file mode 100644 index 0000000..2aa210d Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/08-tree-users.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/09-homepath.png b/1/ISO/assignments/t4-ej1-cmd/imgs/09-homepath.png new file mode 100644 index 0000000..57a29f1 Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/09-homepath.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/10-escritorio.png b/1/ISO/assignments/t4-ej1-cmd/imgs/10-escritorio.png new file mode 100644 index 0000000..693be7c Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/10-escritorio.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/11-doskey-h.png b/1/ISO/assignments/t4-ej1-cmd/imgs/11-doskey-h.png new file mode 100644 index 0000000..5f02e24 Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/11-doskey-h.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/20-admin-users-groups.png b/1/ISO/assignments/t4-ej1-cmd/imgs/20-admin-users-groups.png new file mode 100644 index 0000000..2825c99 Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/20-admin-users-groups.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/21-usuarios.png b/1/ISO/assignments/t4-ej1-cmd/imgs/21-usuarios.png new file mode 100644 index 0000000..c213c41 Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/21-usuarios.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/22-grupos.png b/1/ISO/assignments/t4-ej1-cmd/imgs/22-grupos.png new file mode 100644 index 0000000..93f2407 Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/22-grupos.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/23-grupos-usuario.png b/1/ISO/assignments/t4-ej1-cmd/imgs/23-grupos-usuario.png new file mode 100644 index 0000000..bf29d38 Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/23-grupos-usuario.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/24-new-user.png b/1/ISO/assignments/t4-ej1-cmd/imgs/24-new-user.png new file mode 100644 index 0000000..fe88ff3 Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/24-new-user.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/25-new-users.png b/1/ISO/assignments/t4-ej1-cmd/imgs/25-new-users.png new file mode 100644 index 0000000..33c7416 Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/25-new-users.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/26-no-new-passwd.png b/1/ISO/assignments/t4-ej1-cmd/imgs/26-no-new-passwd.png new file mode 100644 index 0000000..523398b Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/26-no-new-passwd.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/27-users-group.png b/1/ISO/assignments/t4-ej1-cmd/imgs/27-users-group.png new file mode 100644 index 0000000..5d828a5 Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/27-users-group.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/30-new-group-itestaff.png b/1/ISO/assignments/t4-ej1-cmd/imgs/30-new-group-itestaff.png new file mode 100644 index 0000000..3938b79 Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/30-new-group-itestaff.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/31-add-members.png b/1/ISO/assignments/t4-ej1-cmd/imgs/31-add-members.png new file mode 100644 index 0000000..cdb5bd2 Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/31-add-members.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/32-complete-groups.png b/1/ISO/assignments/t4-ej1-cmd/imgs/32-complete-groups.png new file mode 100644 index 0000000..5c7e51f Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/32-complete-groups.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/33-staff01-groups.png b/1/ISO/assignments/t4-ej1-cmd/imgs/33-staff01-groups.png new file mode 100644 index 0000000..f822938 Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/33-staff01-groups.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/34-student-dir-permission.png b/1/ISO/assignments/t4-ej1-cmd/imgs/34-student-dir-permission.png new file mode 100644 index 0000000..a7da05e Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/34-student-dir-permission.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/imgs/35-staff-denial.png b/1/ISO/assignments/t4-ej1-cmd/imgs/35-staff-denial.png new file mode 100644 index 0000000..b0ac378 Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/imgs/35-staff-denial.png differ diff --git a/1/ISO/assignments/t4-ej1-cmd/t4-ej1-cmd.pdf b/1/ISO/assignments/t4-ej1-cmd/t4-ej1-cmd.pdf new file mode 100644 index 0000000..df41329 Binary files /dev/null and b/1/ISO/assignments/t4-ej1-cmd/t4-ej1-cmd.pdf differ diff --git a/1/ISO/assignments/t4-ej1-cmd/t4-ej1-cmd.tex b/1/ISO/assignments/t4-ej1-cmd/t4-ej1-cmd.tex new file mode 100644 index 0000000..98bfcd4 --- /dev/null +++ b/1/ISO/assignments/t4-ej1-cmd/t4-ej1-cmd.tex @@ -0,0 +1,234 @@ +\documentclass[12pt,a4paper]{article} +\usepackage[spanish]{babel} +\usepackage{graphicx} +\usepackage{subcaption} + +\title{Tema IV Ejercicio I: CMD} +\author{Nicolás A. Ortega Froysa} + +\begin{document} +\maketitle +\pagebreak +\tableofcontents +\pagebreak +\section{Hoja De Control Del Documento} +\begin{table}[h!] + \begin{center} + \caption{Documento/Archivo} + \label{tab:document} + \begin{tabular}{|l|c|l|c|} + \hline + {\bf Fecha Última Modificación} & \the\day/\the\month/\the\year & + {\bf Versión/Revisión} & v01r01 \\ \hline + {\bf Fecha Creación} & \the\day/\the\month/\the\year & \hfill & \hfill \\ \hline + {\bf Fecha Finalización} & \the\day/\the\month/\the\year & \hfill & + \hfill \\ \hline + \end{tabular} + \end{center} +\end{table} + +\begin{table}[h!] + \begin{center} + \caption{Registro De Cambios} + \label{tab:registro-cambios} + \begin{tabular}{|c|c|c|} + \hline + {\bf Versión/Revisión} & {\bf Página(s)} & {\bf Descripción} \\ + \hline + v01r01 & Todas & Creación y elaboración del documento. \\ \hline + \end{tabular} + \end{center} +\end{table} + +\begin{table}[h!] + \begin{center} + \caption{Autores Del Documento} + \label{tab:autores} + \begin{tabular}{|c|c|} + \hline + {\bf Apellidos, Nombre} & {\bf Curso} \\ \hline + Ortega Froysa, Nicolás Andrés & 1 \\ \hline + \end{tabular} + \end{center} +\end{table} + +\begin{table}[h!] + \begin{center} + \begin{tabular}{|p{4cm}|p{4cm}|p{4cm}|} + \hline + {\bf Preparado} & {\bf Revisado} & {\bf Aprobado} \\ \hline + Ortega Froysa, Nicolás Andrés & \hfill & \hfill \\ \hline + \end{tabular} + \end{center} +\end{table} + +\pagebreak + +\section{Listado de Archivos} +\begin{figure} + \centering + \includegraphics[width=0.75\linewidth]{imgs/00-abrir-cmd.png} + \caption{Abierto el símbolo del sistema (CMD).} + \label{fig:abrir-cmd} +\end{figure} + +El {\em shell} de Windows lo podemos acceder dando al botón de Windows e +introduciendo el texto ``CMD''. Haciendo esto nos encontraremos con una +aplicación que se denomina ``Símbolo del sistema''. Al abrir esto nos +encontraremos con el {\em shell} clásico de Windows (figura +\ref{fig:abrir-cmd}). Como se ve, la línea de entrada muestra un símbolo +\texttt{>} precedido por el ruta (i.e.\ {\em path}) de la ubicación actual. +Esto último también se puede conocer corriendo el comando \texttt{cd} sin +argumentos. Se puede notar también que los directorios de una ruta en el {\em +shell} de Windows están separadas por el carácter \texttt{\textbackslash}. Esto +es diferente a los sistemas UNIX donde se usa el \texttt{/}, que en el {\em +shell} de Windows se usa para los argumentos de comando; lo que en un sistema +se usaría el \texttt{-}. + +Podemos ver los archivos de un directorio usando el comando \texttt{dir }. +Si no se especifica el directorio, se mostrarán los archivos del directorio +actual (figura \ref{fig:dir}). Esto comando tiene más argumentos que podemos +conocer corriendo el comando \texttt{help dir} (figura \ref{fig:help-dir}). Uno +de estos comandos, por ejemplo, es el \texttt{/Q} que nos mostrará cuál es el +dueño de un archivo (figura \ref{fig:dir-q}). + +\begin{figure} + \centering + \begin{subfigure}[b]{0.45\textwidth} + \centering + \includegraphics[width=0.95\linewidth]{imgs/01-dir.png} + \caption{Uso del comando \texttt{dir}.} + \label{fig:dir} + \end{subfigure} + \hfill + \begin{subfigure}[b]{0.45\textwidth} + \centering + \includegraphics[width=0.95\linewidth]{imgs/02-help-dir.png} + \caption{Información de ayuda del comando \texttt{dir}.} + \label{fig:help-dir} + \end{subfigure} + \hfill + \begin{subfigure}[b]{0.45\textwidth} + \centering + \includegraphics[width=0.95\linewidth]{imgs/03-dir-q.png} + \caption{Comando \texttt{dir} con información de dueño.} + \label{fig:dir-q} + \end{subfigure} + \caption{El comando \texttt{dir}.} +\end{figure} + +\begin{figure} +\end{figure} + +\section{Navegación} +Se puede navegar el sistema de archivos usando el comando \texttt{cd} (i.e.\ +{\em change directory}). Con este comando podemos especificar una ruta a un +directorio en concreto de forma \texttt{cd } y nos llevará a esa ubicación +en el sistema lógico de archivos. Este {\em shell} también nos permite +autocompletar rutas usando el tabulador, de manera que si especificas una ruta +incompleta y le das al tabulador, intentará completarlo con subdirectorios +dentro de ese directorio que tienen esos primeros caracteres. Y como vimos al +principio, si no mencionas ningún directorio destino simplemente imprimirá tu +ubicación actual. También hay ciertos nombres especiales, en particular +\texttt{.} y \texttt{..}, que hacen referencia al directorio actual y superior +respectivamente -- e.g.\ el comando \texttt{cd test\textbackslash..} nos traerá +realmente al mismo directorio y sería igual que correr \texttt{cd .} en su +lugar. + +Para navegar o especificar rutas podemos usar dos tipos de rutas: absolutas y +relativas. Hasta ahora hemos hablado de rutas relativas, que son relativas a la +ubicación actual del usuario en sistema de archivos. Las rutas absolutas nos +dicen dónde está un archivo desde la raíz de un sistema de archivos (e.g.\ +\texttt{C:}, \texttt{D:}). Eso sí, de por sí sólo podremos navegar con +\texttt{cd} dentro de un mismo dispositivo (generalmente \texttt{C:}) salvo si +especificamos el argumento \texttt{/D} para acceder a otro dispositivo (figura +\ref{fig:relative-absolute}). + +\begin{figure} + \centering + \includegraphics[width=0.75\linewidth]{imgs/06-relative-absolute.png} + \caption{Cambio de dispositivo usando el argumento \texttt{/d}.} + \label{fig:relative-absolute} +\end{figure} + +\section{Sistema de Archivos Windows} +Si nos vamos a la ruta raíz del sistema de archivos de nuestro sistema Windows +(\texttt{cd C:}) y imprimimos la lista de todos los archivos dentro de este +directorio veremos algunos directorios interesantes: Windows, Program Files, y +Users (figura \ref{fig:c-drive}). Tienen los siguientes contenidos: + +\begin{itemize} + \item {\bf Windows}: contiene todos los archivos relevantes al sistema + operativo en sí de Windows. + \item {\bf Program Files}: contiene los archivos que precisan los programas + del sistema. A veces existen dos directorios, donde otro tiene añadido + ``(x86)'', que contendrá todos los archivos de programas de 32-bits (en + sistemas de 64-bits). + \item {\bf Users}: aquí se guardan todos los archivos de los usuarios. +\end{itemize} + +\begin{figure} + \centering + \includegraphics[width=0.75\linewidth]{imgs/05-c-drive.png} + \caption{Lista de archivos en \texttt{C:\textbackslash}.} + \label{fig:c-drive} +\end{figure} + +Podemos ver todos los archivos que hay dentro de un directorio y sus +subdirectorios de manera recursiva usando el comando \texttt{tree }. Si no +se especifica el directorio, simplemente mostrará los éstos del directorio +actual. + +\section{Variables de Entorno} +Como en cualquier {\em shell} moderno, también podemos hacer uso de variables. +En Windows éstos se señalan poniendo un \texttt{\%} al principio y al final del +nombre (e.g.\ \texttt{\%MYVAR\%}). Podemos ver todos los variables que están +definidos corriendo el comando \texttt{set} (figura \ref{fig:homepath}). Hay +algunos variables que son específicos al usuario, como sería +\texttt{\%HOMEPATH\%}, que referencia el directorio {\em home} del usuario +actual. Podemos usar esto con nuestros comandos de manera que \texttt{cd +\%HOMEPATH\%} nos traerá al directorio {\em home} de nuestro usuario. Podemos +establecer o sobre escribir éstos por medio también del comando \texttt{set}, +corriendo \texttt{set =} (figura \ref{fig:escritorio}). + +\begin{figure} + \centering + \begin{subfigure}[b]{0.45\textwidth} + \centering + \includegraphics[width=0.95\linewidth]{imgs/09-homepath.png} + \caption{Lista de variables.} + \label{fig:homepath} + \end{subfigure} + \hfill + \begin{subfigure}[b]{0.45\textwidth} + \centering + \includegraphics[width=0.95\linewidth]{imgs/10-escritorio.png} + \caption{Definición de un variable.} + \label{fig:escritorio} + \end{subfigure} +\end{figure} + +\section{Historial del {\em Shell}} +A veces es bueno poder ver el historial de los comandos que hemos corrido en el +{\em shell}. En Windows esto se hace por medio del comando \texttt{DOSKEY} junto +a la opción \texttt{/h}. Esto nos mostrará todos los comandos que hemos corrido. +También podemos guardar esta información a un archivo por medio del {\em pipe} +\texttt{>} de la forma \texttt{DOSKEY /h >\ history.txt} (figura +\ref{fig:doskey-h}). + +\begin{figure} + \centering + \includegraphics[width=0.75\linewidth]{imgs/11-doskey-h.png} + \caption{Historial del {\em shell}.} + \label{fig:doskey-h} +\end{figure} + +\pagebreak + +\section{Derechos de Autor y Licencia} +Copyright \copyright\ \the\year\ Nicolás A. Ortega Froysa +\\ +Este documento se distribuye bajo los términos y condiciones de la licencia +Creative Commons Attribution No Derivatives 4.0 International. + +\end{document} diff --git a/1/ISO/assignments/t4-ej1-cmd/t4-ej1-cmd.toc b/1/ISO/assignments/t4-ej1-cmd/t4-ej1-cmd.toc new file mode 100644 index 0000000..e4932fa --- /dev/null +++ b/1/ISO/assignments/t4-ej1-cmd/t4-ej1-cmd.toc @@ -0,0 +1,8 @@ +\babel@toc {spanish}{} +\contentsline {section}{\numberline {1}Hoja De Control Del Documento}{3}{}% +\contentsline {section}{\numberline {2}Listado de Archivos}{4}{}% +\contentsline {section}{\numberline {3}Navegación}{4}{}% +\contentsline {section}{\numberline {4}Sistema de Archivos Windows}{5}{}% +\contentsline {section}{\numberline {5}Variables de Entorno}{7}{}% +\contentsline {section}{\numberline {6}Historial del {\em Shell}}{7}{}% +\contentsline {section}{\numberline {7}Derechos de Autor y Licencia}{8}{}%