diff --git a/docs/website_as_latex/2018-11-19_12-39.tex b/docs/website_as_latex/2018-11-19_04-03.tex
similarity index 97%
rename from docs/website_as_latex/2018-11-19_12-39.tex
rename to docs/website_as_latex/2018-11-19_04-03.tex
index 90c090e..d89c38e 100644
--- a/docs/website_as_latex/2018-11-19_12-39.tex
+++ b/docs/website_as_latex/2018-11-19_04-03.tex
@@ -1,4 +1,4 @@
-% File autogenerated using the Bonus 2 program at 2018-11-19 12:39
+% File autogenerated using the Bonus 2 program at 2018-11-19 04:03
\documentclass[hidelinks,12pt,a4paper,numbers=enddot]{scrartcl}
\usepackage[margin=2cm]{geometry}
@@ -1331,6 +1331,18 @@ Here are some of the most common basename flags:
\item \textbf{-a}: Supports multiple arguments and they will be treated as a name
\end{itemize}
+Example
+
+\begin{verbatim}
+basename /USI/command
+\end{verbatim}
+
+The shell will output this:
+
+\begin{verbatim}
+command
+\end{verbatim}
+
\section{base64}
@@ -1890,7 +1902,7 @@ If this is not indicated, the command will run the last stopped operation.\\
Stop a working job
-To stop the execution of a command so that i can be later resumed with \texttt{fg}
+To stop the execution of a command so that it can be later resumed with \texttt{fg}
you need to press the \texttt{ctrl + Z} keys. The job number to be used with the
\texttt{fg} command will be printed.
@@ -3548,6 +3560,55 @@ mkdir -m 777 test_free_directory
Our new directory will now have read,write and execute permissions for user, group and others.
+\section{cp}
+
+
+\large Mattia Hijman \normalsize\\
+
+
+
+The \texttt{cp} command copies the contents of one or more files or directories to a
+target file or directory.\\
+
+\begin{verbatim}
+cp [source1] [source2] [source3] ... [target]
+\end{verbatim}
+
+
+Flags
+
+\begin{itemize}
+ \item \textbf{-a}: Same as -pPR options. Preserves structure and attributes of files
+ but not directory structure.
+
+ \item \textbf{-f}: If the destination file cannot be opened, remove it and create a new file,
+ without prompting for confirmation regardless of its permissions.
+ The target file is not unlinked before the copy,
+ so any existing access rights will be retained.
+
+ \item \textbf{-H}: If -R is specified, symbolic links on the command line are followed.
+ \item \textbf{-i}: Cause cp to write a prompt to the standard error output before
+ copying a file that would overwrite an existing file. If the
+ response from the standard input begins with the character \emph{y} or
+ \emph{Y}, the file copy is attempted.
+
+ \item \textbf{-L}: If the -R option is specified, all symbolic links are followed.
+ \item \textbf{-n}: Do not overwrite an existing file.
+ \item \textbf{-P}: If the -R option is specified, no symbolic links are followed.
+ \item \textbf{-p}: Cause cp to preserve the following attributes of each source file
+ in the copy.
+
+ \item \textbf{-R}: If source\_file designates a directory, cp copies the directory and
+ the entire subtree connected at that point. If the source\_file
+ ends in a /, the contents of the directory are copied rather than
+ the directory itself. This option also causes symbolic links to be
+ copied, rather than indirected through, and for cp to create special files
+ rather than copying them as normal files.
+
+ \item \textbf{-v}: Cause cp to be verbose, showing files as they are copied.
+ \item \textbf{-X}: Do not copy Extended Attributes (EAs) or resource forks.
+\end{itemize}
+
\section{Absolute paths}
@@ -3584,6 +3645,44 @@ Here are some other examples of absolute paths:
\item /var/log/messages
\end{itemize}
+\section{touch}
+
+
+\large Mattia Hijman \normalsize\\
+
+
+
+The \texttt{touch} command updates the modification and access time of the a file.
+If the given file does not exists, it gets created.\\
+
+\begin{verbatim}
+touch [flags] [file1] [file2] ...
+\end{verbatim}
+
+Flags
+
+\begin{itemize}
+ \item \textbf{-A}: adjust the access and modification timestamps for the file by the
+ specified value.
+
+ \item \textbf{-a}: Change the access time of the file. The modification time of the
+ file is not changed unless the -m flag is also specified.
+
+ \item \textbf{-c}: Do not create the file if it does not exist.
+ \item \textbf{-f} Attempt to force the update, even if the file permissions do not
+ currently permit it.
+
+ \item \textbf{-h}: If the file is a symbolic link, change the times of the link
+ itself rather than the file that the link points to.
+
+ \item \textbf{-m}: Change the modification time of the file. The access time of the
+ file is not changed unless the -a flag is also specified.
+
+ \item \textbf{-t}: Change the access and modification times to the specified time
+ instead of the current time of day.
+
+\end{itemize}
+
\section{cd}
diff --git a/site/pages/cmd/interm/basename.html b/site/pages/cmd/interm/basename.html
index a5cac21..695f7a2 100644
--- a/site/pages/cmd/interm/basename.html
+++ b/site/pages/cmd/interm/basename.html
@@ -19,7 +19,7 @@ basename [flags] [string] [suffix]
Where [flags] are the cat flags, read below for more info, the string command is
-the pathname and the suffix, if indicated, will be also deleted.
+the pathname and the suffix, if indicated, will be also deleted.
command+
+command +diff --git a/site/pages/fs/cd.html b/site/pages/fs/cd.html index 170ec90..09058a2 100644 --- a/site/pages/fs/cd.html +++ b/site/pages/fs/cd.html @@ -6,7 +6,7 @@ tags: change directory author: Alessandro Marinelli title: cd previous-page: pages/fs/absolute.html -next-page: pages/fs/du.html +next-page: pages/fs/cp.html --- diff --git a/site/pages/fs/cp.html b/site/pages/fs/cp.html index d3e1003..27a53de 100644 --- a/site/pages/fs/cp.html +++ b/site/pages/fs/cp.html @@ -5,108 +5,48 @@ category-title: FileSystem tags: directory list copy cp author: Mattia Hijman title: cp -previous-page: pages/fs/touch.html +previous-page: pages/fs/cd.html +previous-next: pages/fs/du.html --- -In the first synopsis form, the cp utility copies the contents of the source_file to the target_file.
cp
command copies the contents of one or more files or directories to a
+target file or directory.+cp [source1] [source2] [source3] ... [target] ++ + +
mv
command is used to move a file and directories from a given path to another.
-If both files are in the same filesystem it will result as a renaming of the filemv
command is used to move a file from a given path to another.
+It can also be used to rename a file by moving it into the same directory,
+but with a different name.mv [-finv] source target diff --git a/site/pages/fs/rm.html b/site/pages/fs/rm.html index 6fc3db2..694edbb 100644 --- a/site/pages/fs/rm.html +++ b/site/pages/fs/rm.html @@ -6,11 +6,13 @@ tags: directory list remove delete erase author: Mattia Hijman title: rm previous-page: pages/fs/relative.html +next-page: pages/fs/touch.html --- Therm
command is used to delete and unlink directories and files.
It attempts to remove the non-directory type files specified on the command line. If the permissions of the file do not permit writing, the user is prompted for confirmation.
+It stands for ReMove.rm [-dfiPRrvW] file1 file2 file.... diff --git a/site/pages/fs/touch.html b/site/pages/fs/touch.html index 3f6dbfd..e66fd29 100644 --- a/site/pages/fs/touch.html +++ b/site/pages/fs/touch.html @@ -2,49 +2,39 @@ layout: page category-page: fs category-title: FileSystem -tags: directory list create new file +tags: directory list create new file author: Mattia Hijman title: touch previous-page: pages/fs/rm.html --- +Thetouch
command updates the modification and access time of the a file. +If the given file does not exists, it gets created.
+-touch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] - file ... +touch [flags] [file1] [file2] ...+Flags
-The touch utility sets the modification and access times of files. If any file does not exist, it is created with default permissions.
-By default, touch changes both modification and access times. The -a and -m flags may be used to select the access time or the modification time individually. Selecting both is equivalent to the default. By default, the timestamps are set to the current time. The -t flag explicitly specifies a different time, and the -r flag specifies to set the times those of the specified file. -The -A flag adjusts the values by a specified amount.
-The following options are available: