|
235 | 235 | %%%%% |
236 | 236 |
|
237 | 237 | \begin{slide} |
238 | | -\sltitle{Navigace v adresáøové struktuøe} |
| 238 | +\sltitle{Directory structure navigation} |
239 | 239 | \begin{center} |
240 | 240 | \input{img/tex/nav_dir.pstex_t} |
241 | 241 | \end{center} |
242 | 242 | \end{slide} |
243 | 243 |
|
244 | 244 | \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}. |
254 | 253 | \end{itemize} |
255 | 254 |
|
256 | 255 |
|
|
259 | 258 | \pdfbookmark[1]{links and their properties}{links} |
260 | 259 |
|
261 | 260 | \begin{slide} |
262 | | -\sltitle{Linky} |
| 261 | +\sltitle{Links} |
263 | 262 | \begin{center} |
264 | 263 | \input{img/tex/links.tex} |
265 | 264 | \end{center} |
266 | 265 |
|
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. |
269 | 267 | \end{slide} |
270 | 268 |
|
271 | 269 | \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. |
275 | 272 |
|
276 | 273 | \begin{description} |
277 | 274 | \item[hardlink]~ |
278 | 275 |
|
279 | 276 | \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 |
285 | 282 | \end{itemize} |
286 | | -\item [symbolický link (symlink, softlink)]~ |
| 283 | +\item [symbolic link (symlink, softlink)]~ |
287 | 284 |
|
288 | 285 | \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 |
297 | 293 | \end{itemize} |
298 | 294 | \end{description} |
299 | 295 |
|
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. |
303 | 299 |
|
304 | 300 | \begin{verbatim} |
305 | | -$ ls -i /etc/passwd |
| 301 | +$ ls -i /etc/passwd |
306 | 302 | 172789 /etc/passwd |
307 | 303 | \end{verbatim} |
308 | 304 | \end{itemize} |
|
0 commit comments