Minor updates; added «system» chapter
This commit is contained in:
parent
bfaba4e95b
commit
0b91070e4a
3
bits/find_PWD.tex
Normal file
3
bits/find_PWD.tex
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
\begin{Verbatim}[]
|
||||||
|
find "$PWD"
|
||||||
|
\end{Verbatim}
|
||||||
@ -1,7 +1,27 @@
|
|||||||
\chapter{Files}
|
\chapter{Files}
|
||||||
|
|
||||||
\section{To Remove Part of a Filename from Multiple Files}
|
\section{Remove Part of a Filename from Multiple Files}
|
||||||
|
|
||||||
\lettrine{U}{se} the \texttt{mmv}\index{mmv} package to do this.
|
\lettrine{S}{ome} applications can produce files that are similarly named, and for whatever reason, you want to remove the repetitive bits. You can use the \texttt{mmv}\index{mmv} package to do this. Assume you have a list of files that all start with ``foo'':
|
||||||
|
|
||||||
\lettrine{T}{his} can also be accomplished by using the \textbf{rename}\index{rename} command.
|
\begin{Verbatim}[]
|
||||||
|
foo143.txt
|
||||||
|
fooabi.txt
|
||||||
|
foo38r.txt
|
||||||
|
\end{Verbatim}
|
||||||
|
|
||||||
|
\lettrine{T}{his} can also be accomplished by using the \textbf{rename}\index{rename} command.
|
||||||
|
|
||||||
|
\section{Obtain a List of Files and their Paths}
|
||||||
|
|
||||||
|
\lettrine{T}{he} \texttt{find} command has options to obtain this list. To obtain this list with the full path, use:
|
||||||
|
|
||||||
|
\input{bits/find_PWD}
|
||||||
|
|
||||||
|
To obtain this list with a relative path, use:
|
||||||
|
|
||||||
|
\begin{Verbatim}[]
|
||||||
|
find .
|
||||||
|
\end{Verbatim}
|
||||||
|
|
||||||
|
\ktcbox{Sometimes you need a list of files with their filepaths, and these tools will do that. Unfortunately, Linux does not have a way to put the file first, so the way to do this is to redirect \texttt{stdout} to a \texttt{.csv} file and manipulate the output in a spreadsheet.}
|
||||||
27
chapters/ch04-system.tex
Normal file
27
chapters/ch04-system.tex
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
\chapter{Files}
|
||||||
|
|
||||||
|
\section{Remove Part of a Filename from Multiple Files}
|
||||||
|
|
||||||
|
\lettrine{S}{ome} applications can produce files that are similarly named, and for whatever reason, you want to remove the repetitive bits. You can use the \texttt{mmv}\index{mmv} package to do this. Assume you have a list of files that all start with ``foo'':
|
||||||
|
|
||||||
|
\begin{Verbatim}[]
|
||||||
|
foo143.txt
|
||||||
|
fooabi.txt
|
||||||
|
foo38r.txt
|
||||||
|
\end{Verbatim}
|
||||||
|
|
||||||
|
\lettrine{T}{his} can also be accomplished by using the \textbf{rename}\index{rename} command.
|
||||||
|
|
||||||
|
\section{Obtain a List of Files and their Paths}
|
||||||
|
|
||||||
|
\lettrine{T}{he} \texttt{find} command has options to obtain this list. To obtain this list with the full path, use:
|
||||||
|
|
||||||
|
\input{bits/find_PWD}
|
||||||
|
|
||||||
|
To obtain this list with a relative path, use:
|
||||||
|
|
||||||
|
\begin{Verbatim}[]
|
||||||
|
find .
|
||||||
|
\end{Verbatim}
|
||||||
|
|
||||||
|
\ktcbox{Sometimes you need a list of files with their filepaths, and these tools will do that. Unfortunately, Linux does not have a way to put the file first, so the way to do this is to redirect \texttt{stdout} to a \texttt{.csv} file and manipulate the output in a spreadsheet.}
|
||||||
@ -11,6 +11,7 @@
|
|||||||
\usepackage{float} % Allow floats in multicol environments
|
\usepackage{float} % Allow floats in multicol environments
|
||||||
\usepackage{tcolorbox}
|
\usepackage{tcolorbox}
|
||||||
\usepackage{fancyvrb}
|
\usepackage{fancyvrb}
|
||||||
|
\usepackage{sim-os-menus}
|
||||||
%\usepackage{etoolbox}
|
%\usepackage{etoolbox}
|
||||||
\usepackage{imakeidx}
|
\usepackage{imakeidx}
|
||||||
\usepackage{aurical} % Font for section titles
|
\usepackage{aurical} % Font for section titles
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user