Skip to content

Commit 3581e4e

Browse files
author
Vladimir Kotal
committed
yet two more FS slides
1 parent d59b8b6 commit 3581e4e

File tree

2 files changed

+32
-36
lines changed

2 files changed

+32
-36
lines changed

files.tex

Lines changed: 30 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -235,22 +235,21 @@
235235
%%%%%
236236

237237
\begin{slide}
238-
\sltitle{Navigace v adresáøové struktuøe}
238+
\sltitle{Directory structure navigation}
239239
\begin{center}
240240
\input{img/tex/nav_dir.pstex_t}
241241
\end{center}
242242
\end{slide}
243243

244244
\begin{itemize}
245-
\item kdy¾ cesta zaèíná znakem '\texttt{/}', zaèíná navigace v koøenovém
246-
adresáøi, jinak zaène v~pracovním adresáøi procesu.
247-
\item koøenový adresáø má typicky èíslo 2. 0 je pro oznaèení prázdného uzlu a
248-
1 byla døíve pou¾ívaná pro soubor, do kterého se vkládaly vadné bloky, aby je
249-
systém u¾ dále nepou¾íval.
250-
251-
252-
\item cesta ve které je více lomítek za sebou je stále platná, tj.
253-
\texttt{///a///b///c} je ekvivaletní \texttt{/a/b/c}.
245+
\item if a path begins with '\texttt{/}', the navigation starts in the root
246+
directory, otherwise it starts in the working directory of given process.
247+
\item the i-node number of root directory is typically 2. 0 is reserved for
248+
empty i-node and 1 used to be a file into which bad blocks were inserted to
249+
avoid them being used.
250+
251+
\item path that has multiple consecutive slashes is still valid, i.e.
252+
\texttt{///a///b///c} is equivalent to \texttt{/a/b/c}.
254253
\end{itemize}
255254

256255

@@ -259,50 +258,47 @@
259258
\pdfbookmark[1]{links and their properties}{links}
260259

261260
\begin{slide}
262-
\sltitle{Linky}
261+
\sltitle{Links}
263262
\begin{center}
264263
\input{img/tex/links.tex}
265264
\end{center}
266265

267-
Hard linky lze vytváøet pouze v rámci jednoho (logického)
268-
filesystému.
266+
Hard links can be created within one (logical) file system.
269267
\end{slide}
270268

271269
\begin{itemize}
272-
\item to co ``normálnì'' vidíte pøi výpisu adresáøù jsou vìt¹inou hardlinky,
273-
tak¾e rozdìl{}ení není na soubory, hardlinky a symbolické linky. Co se týèe
274-
souborù, jsou \emsl{pouze} hardlinky a symlinky.
270+
\item what is ``normally'' visible in directory listings are hard links.
271+
W.r.t. files there are \emsl{only} hardlink a symlinks.
275272

276273
\begin{description}
277274
\item[hardlink]~
278275

279276
\begin{itemize}
280-
\item odkaz na stejný i-uzel
281-
\item vlastnì druhé jméno souboru
282-
\item není rozdíl mezi originálem a hardlinkem
283-
\item lze vytváøet jen v rámci filesystému
284-
\item nelze vytváøet pro adresáøe
277+
\item reference to the same i-node
278+
\item actually second name of a file
279+
\item no difference between original and hard link
280+
\item can be created only within one file system
281+
\item not possible to create for directories
285282
\end{itemize}
286-
\item [symbolický link (symlink, softlink)]~
283+
\item [symbolic link (symlink, softlink)]~
287284

288285
\begin{itemize}
289-
\item pouze odkaz na skuteènou cestu k souboru jiného typu (\texttt{ls -l}
290-
jej o\-zna\-èu\-je '\texttt{l}'), tj. symbolický link je typem odli¹ný od
291-
bì¾ného souboru a jeho data obsahují obyèejný øetìzec -- jméno cesty, a»
292-
ji¾ relativní nebo absolutní
293-
\item odli¹né chování pro originál a link (napø. pøi mazání)
294-
\item pozor na relativní a absolutní cesty pøi pøesouvání
295-
symbolického linku
296-
\item mù¾e ukazovat i na adresáø nebo na neexistující soubor
286+
\item only reference to the real path of file of different type
287+
(it is marked as '\texttt{l}' in the \texttt{ls -l} output), i.e. the type
288+
of symbolic differs from ordinary file. Its data contain a simple string
289+
-- name of the path, either relative or absolute.
290+
\item different behavior for original and symlink (e.g. upon unlink)
291+
\item watch out for relative and absolute paths when moving symbolic link
292+
\item can point to directory or non-existing file
297293
\end{itemize}
298294
\end{description}
299295

300-
\item nejjednodu¹¹í zpùsob jak si ovìøit, zda dané dva linky ukazují na
301-
stejný soubor na disku je pou¾ít \texttt{-i} pøepínaè pøíkazu
302-
\texttt{ls}, který vám uká¾e èíslo indexového uzlu.
296+
\item the simplest way how to verify that two links point to the same file is to
297+
use the \texttt{-i} option of the \texttt{ls} command, that will show the i-node
298+
number.
303299

304300
\begin{verbatim}
305-
$ ls -i /etc/passwd
301+
$ ls -i /etc/passwd
306302
172789 /etc/passwd
307303
\end{verbatim}
308304
\end{itemize}

img/tex/links.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@
4646
}}}
4747
\put(901,389){\makebox(0,0)[lb]{\smash{\SetFigFont{10}{12.0}{\ttdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}/var}%
4848
}}}
49-
\put(2251,569){\makebox(0,0)[lb]{\smash{\SetFigFont{10}{12.0}{\sfdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}originál}%
49+
\put(2251,569){\makebox(0,0)[lb]{\smash{\SetFigFont{10}{12.0}{\sfdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}original}%
5050
}}}
5151
\put(2341,389){\makebox(0,0)[lb]{\smash{\SetFigFont{10}{12.0}{\ttdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}/etc}%
5252
}}}
53-
\put(3466,569){\makebox(0,0)[lb]{\smash{\SetFigFont{10}{12.0}{\sfdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}symbolický link}%
53+
\put(3466,569){\makebox(0,0)[lb]{\smash{\SetFigFont{10}{12.0}{\sfdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}symbolic link}%
5454
}}}
5555
\put(3781,389){\makebox(0,0)[lb]{\smash{\SetFigFont{10}{12.0}{\ttdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}/usr}%
5656
}}}

0 commit comments

Comments
 (0)