diff --git a/Corsi GNU Linux Avanzati/Bash e Filtri/Bash e Filtri.lyx b/Corsi GNU Linux Avanzati/Bash e Filtri/Bash e Filtri.lyx new file mode 100644 index 0000000..c4bbfae --- /dev/null +++ b/Corsi GNU Linux Avanzati/Bash e Filtri/Bash e Filtri.lyx @@ -0,0 +1,2198 @@ +#LyX 2.0 created this file. For more info see http://www.lyx.org/ +\lyxformat 413 +\begin_document +\begin_header +\textclass beamer +\begin_preamble +\usetheme{CambridgeUS} +\usecolortheme{beaver} +% or ... +% set fonts for nicer pdf view +\IfFileExists{lmodern.sty}{\usepackage{lmodern}}{} + +\setbeamercovered{transparent} +% or whatever (possibly just delete it) + + + +\titlegraphic{\includegraphics[height=2cm]{poul-logo.pdf}} +\end_preamble +\use_default_options false +\maintain_unincluded_children false +\language italian +\language_package default +\inputencoding auto +\fontencoding global +\font_roman times +\font_sans default +\font_typewriter default +\font_default_family default +\use_non_tex_fonts false +\font_sc false +\font_osf false +\font_sf_scale 100 +\font_tt_scale 100 + +\graphics default +\default_output_format default +\output_sync 0 +\bibtex_command default +\index_command default +\paperfontsize default +\spacing single +\use_hyperref false +\papersize default +\use_geometry true +\use_amsmath 2 +\use_esint 0 +\use_mhchem 1 +\use_mathdots 1 +\cite_engine basic +\use_bibtopic false +\use_indices false +\paperorientation portrait +\suppress_date false +\use_refstyle 0 +\index Index +\shortcut idx +\color #008000 +\end_index +\secnumdepth 2 +\tocdepth 2 +\paragraph_separation indent +\paragraph_indentation default +\quotes_language english +\papercolumns 1 +\papersides 1 +\paperpagestyle default +\tracking_changes false +\output_changes false +\html_math_output 0 +\html_css_as_file 0 +\html_be_strict false +\end_header + +\begin_body + +\begin_layout Standard +\begin_inset Note Note +status open + +\begin_layout Plain Layout +This file is a solution template for: +\end_layout + +\begin_layout Itemize +Talk at a conference/colloquium. + +\end_layout + +\begin_layout Itemize +Talk length is about 20min. + +\end_layout + +\begin_layout Itemize +Style is ornate. +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Note Note +status collapsed + +\begin_layout Plain Layout +Copyright 2004 by Till Tantau . + +\end_layout + +\begin_layout Plain Layout +In principle, this file can be redistributed and/or modified under the terms + of the GNU Public License, version 2. + However, this file is supposed to be a template to be modified for your + own needs. + For this reason, if you use this file as a template and not specifically + distribute it as part of a another package/program, the author grants the + extra permission to freely copy and modify this file as you see fit and + even to delete this copyright notice. + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Section* +Command-line kung-fu +\end_layout + +\begin_layout Title +Command line kung fu +\begin_inset Argument +status open + +\begin_layout Plain Layout +Bash e filtri +\begin_inset Note Note +status open + +\begin_layout Plain Layout +optional, use only with long paper titles +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Subtitle +Bash, filtri & co. +\end_layout + +\begin_layout Author +Emanuele Santoro +\begin_inset Newline newline +\end_inset + + +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +href{mailto:manu@santoro.tk}{ +\backslash +nolinkurl{manu@santoro.tk}} +\end_layout + +\end_inset + + +\begin_inset Argument +status open + +\begin_layout Plain Layout +Emanuele Santoro +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Date +Corsi GNU/Linux Avanzati 2015 +\begin_inset Note Note +status collapsed + +\begin_layout Itemize +Either use conference name or its abbreviation. + +\end_layout + +\begin_layout Itemize +Not really informative to the audience, more for people (including yourself) + who are reading the slides online +\end_layout + +\end_inset + + +\begin_inset Argument +status open + +\begin_layout Plain Layout +Corsi Linux Avanzati 2015 +\begin_inset Note Note +status collapsed + +\begin_layout Plain Layout +optional, should be abbreviation of conference name +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Note Note +status open + +\begin_layout Plain Layout +If you wish to uncover everything in a step-wise fashion, uncomment the + following command: +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +beamerdefaultoverlayspecification{<+->} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Note Note +status open + +\begin_layout Plain Layout +Structuring a talk is a difficult task and the following structure may not + be suitable. + Here are some rules that apply for this solution: +\end_layout + +\begin_layout Itemize +Exactly two or three sections (other than the summary). + +\end_layout + +\begin_layout Itemize +At *most* three subsections per section. + +\end_layout + +\begin_layout Itemize +Talk about 30s to 2min per frame. + So there should be between about 15 and 30 frames, all told. +\end_layout + +\begin_layout Itemize +A conference audience is likely to know very little of what you are going + to talk about. + So *simplify*! +\end_layout + +\begin_layout Itemize +In a 20min talk, getting the main ideas across is hard enough. + Leave out details, even if it means being less precise than you think necessary. + +\end_layout + +\begin_layout Itemize +If you omit details that are vital to the proof/implementation, just say + so once. + Everybody will be happy with that. + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Section +Bash 101 +\end_layout + +\begin_layout Subsection +I vantaggi del terminale +\end_layout + +\begin_layout BeginFrame +“Il terminale? Nel 2014?” +\end_layout + +\begin_layout FrameSubtitle +\begin_inset Note Note +status open + +\begin_layout Plain Layout +A title should summarize the slide in an understandable fashion for anyone + how does not follow everything on the slide itself. + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +Anche nell'era delle gui graficose e colorate, usare un interprete di comandi + testuale ha i suoi vantaggi +\end_layout + +\begin_layout Pause + +\end_layout + +\begin_layout Itemize +Funziona su qualsiasi distribuzione di GNU/Linux, e anche sulla maggior + parte dei sistemi non-linux +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize +Si può usare da remoto e/o su una macchina senza schermo +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize +Molto semplice da programmare, ottima per automatizzare compiti ripetitivi +\end_layout + +\begin_deeper +\begin_layout Itemize +Essendo un vero e proprio linguaggio di programmazione, è preciso ed affidabile. + Se dovete operare in maniera precisa su molti files, è un modo veloce e + preciso di operare. +\end_layout + +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize +Se nulla altro sembra andare, un terminale non si nega a nessuno +\end_layout + +\begin_layout Subsection +Man +\end_layout + +\begin_layout BeginFrame +I have no idea what i'm doing +\end_layout + +\begin_layout Standard +\align center + +\family typewriter +\size larger +man +\end_layout + +\begin_layout Itemize +Se incontrate un comando nuovo e/o volete saperne di più sulle funzioni + di un comando usate +\family typewriter +man +\family default + (manual) +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize +La sintassi del comando sarà del tipo +\family typewriter +comando [opzioni] [argomenti] argomento +\family default +. + Tutto ciò che è tra parentesi quadre è opzionale, le opzioni si passano + con uno o due trattini (- o +\begin_inset ERT +status open + +\begin_layout Plain Layout + +- +\backslash +/- +\end_layout + +\end_inset + +) +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize +Per cercare all'interno della man page basta scrivere +\family typewriter +/terminecercato +\family default + e premere +\family typewriter +Enter +\family default +. + Premendo n si passa al prossimo match. +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\begin_layout Itemize +La ricerca non fa il wrap-around, arrivati alla fine della manpage premete + +\family typewriter +p +\family default + per tornare in cima +\end_layout + +\begin_layout Itemize +Nota: il comportamento preciso della ricerca dipende dal pager in uso (tipicamen +te +\family typewriter +less +\family default + o +\family typewriter +more +\family default +) +\end_layout + +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize +Premendo +\family typewriter +q +\family default + si esce dalla manpage +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize + +\family typewriter +Se avete dubbi... + man man ;) +\end_layout + +\begin_layout Subsection +Comandi bash di base +\end_layout + +\begin_layout BeginFrame +Muovere i primi passi +\end_layout + +\begin_layout Itemize + +\family typewriter +ls +\family default + -- elenca i file nella cartella corrente +\end_layout + +\begin_deeper +\begin_layout Itemize + +\family typewriter +ls nomecartella -- +\family default + elenca i file della cartella con quel nome +\end_layout + +\begin_layout Itemize + +\family typewriter +-lah +\family default + -- mostra i file incolonnati con maggiori informazioni (-l) includendo + anche i file nascosti (-a) con le dimensioni in formato human-readable + (-h) +\end_layout + +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize + +\family typewriter +cd nomecartella +\family default + -- ci sposta nella directory +\end_layout + +\begin_deeper +\begin_layout Itemize +. + è la directory corrente, .. + è la directory un livello più in su +\end_layout + +\begin_layout Itemize +~ è la cartella home dell'utente corrente ~ è la home di +\end_layout + +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize + +\family typewriter +pwd +\family default + -- stampa la directory in cui ci si trova +\end_layout + +\begin_layout BeginFrame +Creiamo qualcosa +\end_layout + +\begin_layout Itemize + +\family typewriter +touch nomefile +\family default + -- crea un file vuoto se non esiste, altrimenti ne aggiorna la data e l'ora + dell'ultimo accesso +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize + +\family typewriter +mkdir nomecartella +\family default + -- crea una directory vuota +\end_layout + +\begin_deeper +\begin_layout Itemize +-p -- crea tutte le directory necessarie (e.g. + +\family typewriter +mkdir a/b/c/ +\family default + crea anche a e b se non esistono) +\end_layout + +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout AlertBlock +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{Nota importante} +\end_layout + +\end_inset + +Il filesystem Linux, a differenza di quello Windows, è case sensitive. +\begin_inset Newline newline +\end_inset + +Se create (o modificate) i file ricordate che +\family typewriter +foo +\begin_inset ERT +status open + +\begin_layout Plain Layout + +$ +\backslash +neq$ +\end_layout + +\end_inset + + Foo +\begin_inset ERT +status open + +\begin_layout Plain Layout + +$ +\backslash +neq$ +\end_layout + +\end_inset + + FOO +\end_layout + +\begin_layout BeginFrame +Io ti ho creato, io ti distruggo +\end_layout + +\begin_layout Standard +\begin_inset Note Note +status open + +\begin_layout Plain Layout +Da qui rm e varie (shred). + Alert sul fatto che è tutto sempre definitivo. + Mini-demo sui comandi visti finora. + +\end_layout + +\begin_layout Plain Layout +Poi Editor di testo. + nano (-w), vim e emacs. + Mini demo di nano e vim. +\end_layout + +\begin_layout Plain Layout +Filtri, pipe e cazzi. + Demo su filtri pipe e cazzi. +\end_layout + +\begin_layout Plain Layout +[Se ci sta: script bash] +\end_layout + +\begin_layout Plain Layout +[optional: pre-intro sul POuL.] +\end_layout + +\begin_layout Plain Layout +[optional: pre-intro sull'amministrazione di sistema.] +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Itemize + +\family typewriter +rm nomefile +\family default + -- cancella un file +\end_layout + +\begin_deeper +\begin_layout Itemize + +\family typewriter +-r +\family default + -- se il file è una cartella, cancella ricorsivamente il suo contenuto +\end_layout + +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize + +\family typewriter +rmdir nomecartella +\family default + -- cancella una cartella solo se vuota +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize +Se siete paranoici: +\family typewriter +shred nomefile +\family default + -- sovrascrive un file con bit random 3 volte +\end_layout + +\begin_deeper +\begin_layout Itemize + +\family typewriter +-u +\family default + -- dopo averlo sovrascritto, lo cancella +\end_layout + +\begin_layout Itemize +-n -- sovrascrive il file k volte invece di tre +\end_layout + +\begin_layout Itemize +-z -- sovrascrive il file un'ultima volta con degli zeri, per nascondere + la rimozione sicura +\end_layout + +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout AlertBlock +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{Attenzione} +\end_layout + +\end_inset + + Nel terminale, non esiste un “cestino”. + Una volta che avete rimosso un file, è perso per sempre. +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +footnotemark +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +footnotetext{A meno di strani magheggi con software forense} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout BeginFrame +Modifiche di base ai file +\end_layout + +\begin_layout Itemize + +\family typewriter +cp sorgente destinazione +\family default + -- Copia il file +\family typewriter +sorgente +\family default + nel file +\family typewriter +destinazione +\end_layout + +\begin_deeper +\begin_layout Itemize + +\family typewriter +-r +\family default + -- Da usare per copiare una directory +\end_layout + +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize + +\family typewriter +mv sorgente destinazione +\family default + -- Sposta il file sorgente in destinazione +\end_layout + +\begin_deeper +\begin_layout Itemize +Si può usare per rinominare i file se +\family typewriter +destinazione +\family default + è nella stessa cartella di +\family typewriter +sorgente +\end_layout + +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize + +\family typewriter +ln -s sorgente /path/al/collegamento +\family default + -- Crea un collegamento simbolico al file +\family typewriter +sorgente +\family default + in +\family typewriter +/path/al/collegamento +\end_layout + +\begin_layout BeginFrame +Historia magistra vitae +\end_layout + +\begin_layout Itemize + +\family typewriter +Ctrl+p +\family default + o +\begin_inset ERT +status open + +\begin_layout Plain Layout + +$ +\backslash +uparrow$ +\end_layout + +\end_inset + + per andare indietro (comandi più vecchi) nella history dei comandi +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize + +\family typewriter +Ctrl+n +\family default + o +\begin_inset ERT +status open + +\begin_layout Plain Layout + +$ +\backslash +downarrow$ +\end_layout + +\end_inset + + per avanti (comandi più recenti) nella history dei comandi +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize + +\family typewriter +Ctrl+r +\family default + per effetturare la ricerca di una stringa nei comandi della history +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize +La history è salvata nel file +\family typewriter +.bash_history +\family default + nella home dell'utente +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize +Il comando +\family typewriter +history +\family default + vi mostra ... + la vostra history dei comandi +\end_layout + +\begin_layout BeginFrame +Domande? +\end_layout + +\begin_layout Pause + +\end_layout + +\begin_layout Standard +\align center + +\size huge +Demo! +\end_layout + +\begin_layout Section +Vi for dummies +\end_layout + +\begin_layout Subsection +Introduzione +\end_layout + +\begin_layout BeginFrame +Text-editor e le religioni +\end_layout + +\begin_layout Standard +Nell'amministrazione di sistemi Unix e Unix-compatibili si tende a passare + molto tempo usando editor di testo. +\end_layout + +\begin_layout Standard +Viene pertanto naturale abituarsi ad un certo editor, personalizzarlo, renderlo + più efficace. +\end_layout + +\begin_layout Standard +Gli editor principali su i sistemi Unix sono tre: +\end_layout + +\begin_layout Itemize + +\family typewriter +nano +\end_layout + +\begin_layout Itemize + +\family typewriter +vi +\end_layout + +\begin_layout Itemize + +\family typewriter +GNU Emacs +\end_layout + +\begin_layout Standard +Nano è un editor semplice da usare, che offre poche possibilità di personalizzaz +ione e decisamente poche funzionalità avanzate. +\end_layout + +\begin_layout Standard +vi e GNU Emacs sono due editor complessi ma molto potenti. +\end_layout + +\begin_layout Subsection +vi +\end_layout + +\begin_layout BeginFrame +vi for dummies +\end_layout + +\begin_layout Standard +Perché imparare ad usare vi, anche se ci piace GNU Emacs, nano, o qualcos'altro? +\end_layout + +\begin_layout Standard +Senza entrare nelle guerre di religione, vi è l'unico editor che sicuramente + troverete in tutti gli Unix che vi troverete ad usare. + Infatti la sua presenza è +\begin_inset Quotes eld +\end_inset + +imposta +\begin_inset Quotes erd +\end_inset + + nella +\begin_inset Quotes eld +\end_inset + +Single UNIX specification +\begin_inset Quotes erd +\end_inset + +. +\end_layout + +\begin_layout EndFrame + +\end_layout + +\begin_layout BeginFrame +editor modale +\end_layout + +\begin_layout Standard +Vi è un editor +\begin_inset Quotes eld +\end_inset + +particolare +\begin_inset Quotes erd +\end_inset + +. + +\end_layout + +\begin_layout Standard +Vi è un editor +\begin_inset Quotes eld +\end_inset + +modale +\begin_inset Quotes erd +\end_inset + +, nel senso che ha due modalità di funzionamento, e gli stessi tasti si + comportano diversamente a seconda della modalità in cui vi trovate. +\end_layout + +\begin_layout Standard +Le due modalità sono la +\begin_inset Quotes eld +\end_inset + +modalità inserimento +\begin_inset Quotes erd +\end_inset + + e la +\begin_inset Quotes eld +\end_inset + +modalità comandi +\begin_inset Quotes erd +\end_inset + +. +\end_layout + +\begin_layout Standard +La modalità predefinita è la modalità comandi. + Premendo Esc si torna sempre nella modalità comandi. +\end_layout + +\begin_layout Standard +Premendo i, a oppure o si entra nella modalità inserimento. +\end_layout + +\begin_layout EndFrame + +\end_layout + +\begin_layout BeginFrame +modalità comandi +\end_layout + +\begin_layout Standard +Nella modalità comandi, tutti i tasti della vostra tastiera forniscono dei + comandi all'editor. + Sequenze diverse di caratteri forniscono comandi diversi. +\end_layout + +\begin_layout Itemize +Spostarsi nel file: h (sinistra) j (sotto) k (sopra) l (destra) +\end_layout + +\begin_layout Itemize +i -- inserire del testo a partire dalla posizione corrente del cursore +\end_layout + +\begin_layout Itemize +a -- inserire del testo appartire dalla posizione immediatamente successiva + al cursore +\end_layout + +\begin_layout Itemize +/ -- inizia una ricerca di testo nel documento +\end_layout + +\begin_layout Itemize +n -- trova la prossima occorrenza del testo cercato nella ricerca +\end_layout + +\begin_layout Itemize +u -- annulla l'ultima operazione (undo) +\end_layout + +\begin_layout Itemize +. + -- ripete l'ultima operazione (eventualmente annulla l'annullamento) +\end_layout + +\begin_layout Itemize +: (due punti) -- comincia ad inserire un comando +\end_layout + +\begin_layout EndFrame + +\end_layout + +\begin_layout BeginFrame +Vi for dummies - i comandi +\end_layout + +\begin_layout Itemize +:w -- write, salva il file corrente +\end_layout + +\begin_layout Itemize +:q -- quit (esci) +\end_layout + +\begin_layout Itemize +I comandi possono essere concatenati: salva + esci = :wq +\end_layout + +\begin_layout Standard +A seconda del tipo di vi che state usando (vim, nvi, elvis o altro) ci potrebber +o essere dalle decine alle centinaia di altri comandi, ma questi sono bene + o male quelli che vi serviranno sempre. +\end_layout + +\begin_layout EndFrame + +\end_layout + +\begin_layout BeginFrame +Vi for dummies - la modalità inserimento +\end_layout + +\begin_layout Standard +Nella modalità inserimento si può effettivamente inserire/cancellare del + testo. +\end_layout + +\begin_layout Standard +Per entrare in modalità inserimento si preme: +\end_layout + +\begin_layout Itemize +i -- per inserire del testo nella posizione corrente del cursore (insert) +\end_layout + +\begin_layout Itemize +a -- per +\begin_inset Quotes eld +\end_inset + +appendere +\begin_inset Quotes erd +\end_inset + + del testo, ovvero inserire del testo nella posizione immediatamente successiva + a quella del cursore +\end_layout + +\begin_layout Itemize +o -- per inserire del testo nella linea successiva a quella corrente +\end_layout + +\begin_layout Standard +Dopo ognuno di questi comandi si entra nella modalità inserimento. + Per uscire dalla modalità inserimento si preme Esc. +\end_layout + +\begin_layout EndFrame + +\end_layout + +\begin_layout BeginFrame + +\end_layout + +\begin_layout Pause + +\end_layout + +\begin_layout Standard +\align center + +\size larger +Demo! +\end_layout + +\begin_layout Section +Altri comandi bash e filtri +\end_layout + +\begin_layout Subsection +Bash++ +\end_layout + +\begin_layout BeginFrame +Bash++ +\end_layout + +\begin_layout Itemize + +\family typewriter +cat +\family default + -- concatena e stampa file su schermo +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize + +\family typewriter +less +\family default + -- stampa file su schermo con una finestra scorrevole, come la manpage +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize + +\family typewriter +echo +\family default + -- stampa il valore di un'espressione +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize + +\family typewriter +locate +\family default + -- cerca file in un database +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\begin_layout Itemize +Il database va aggiornato periodicamente con il comando +\family typewriter +updatedb +\end_layout + +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize + +\family typewriter +find +\family default + -- cerca dei file all'interno di una gerarchia di cartelle, eventualmente + con dei parametri di ricerca +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Subsection +Redirezione e pipe +\end_layout + +\begin_layout BeginFrame +Standard streams +\end_layout + +\begin_layout Standard +Ogni processo ha almeno 3 canali di comunicazione di default: +\end_layout + +\begin_layout Pause + +\end_layout + +\begin_layout Itemize +stdin (0) -- il canale che di riceve l'input, di default riceve ciò che + l'utente scrive sul terminale +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize +stdout (1) -- il canale che stampa l'output del programma, di default stampa + su terminale +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize +stderr (2) -- un canale extra per segnalare errori senza mischiarli con + l'output. + di default scrive sul terminale +\end_layout + +\begin_layout Pause + +\end_layout + +\begin_layout Standard +Con pipe e redirezioni si possono connettere in vari modi questi canali, + creando delle vere e proprie “catene di montaggio” di comandi bash che + permettono di risolvere molti problemi unendo tanti blocchi semplici. +\end_layout + +\begin_layout BeginFrame +Redirezione +\end_layout + +\begin_layout Itemize + +\family typewriter +comando < file +\family default + -- connette stdin di un processo ad un file +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize + +\family typewriter +comando > file +\family default + -- connette stdout di un processo ad un file. + Se il file esiste viene cancellato e sovrascritto +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize + +\family typewriter +comando 2> file +\family default + -- connette stderr di un processo ad un file. + Se il file esiste viene cancellato e sovrascritto +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize +comando +\family typewriter +&> file +\family default +-- connette stdout e stderr di un processo ad un file. + Se il file esiste viene cancellato e sovrascritto +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize +Utilizzando >> al posto di > in uno degli ultimi 3 comandi si ottiene lo + stesso risultato ma il risultato viene aggiunto al file se esistente +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize + +\family typewriter +comando1 | comando2 +\family default + -- lo stdout di comando1 diventa lo stdin di comando2 +\end_layout + +\begin_layout BeginFrame +Esecuzione condizionale +\end_layout + +\begin_layout Itemize + +\family typewriter +comando1 && comando2 +\family default + -- esegue +\family typewriter +comando2 +\family default + se e solo se +\family typewriter +comando1 +\family default + ha successo (codice di ritorno = 0) +\end_layout + +\begin_deeper +\begin_layout Pause + +\end_layout + +\end_deeper +\begin_layout Itemize + +\family typewriter +comando1 || comando2 +\family default +-- esegue +\family typewriter +comando2 +\family default + se e solo se +\family typewriter +comando1 +\family default + fallisce (codice di ritorno +\begin_inset ERT +status open + +\begin_layout Plain Layout + +$ +\backslash +neq$ +\end_layout + +\end_inset + + 0) +\end_layout + +\begin_layout Subsection +Filtri +\end_layout + +\begin_layout BeginFrame +Cos'è un filtro ? +\end_layout + +\begin_layout Standard +In Unix, un filtro è un programma che: +\end_layout + +\begin_layout Itemize +legge dati in ingresso sullo stdin +\end_layout + +\begin_layout Itemize +trasforma questi dati in qualche maniera +\end_layout + +\begin_layout Itemize +produce dell'output su stdout. + l'ouput può essere una versione trasformata dell'input oppure altro. +\end_layout + +\begin_layout Standard +In Unix i filtri sono importanti perché data la loro natura (leggere su + stdin e scrivere su stdout) si prestano molto bene ad essere usati +\begin_inset Quotes eld +\end_inset + +in cascata +\begin_inset Quotes erd +\end_inset + + tramite le pipe. +\end_layout + +\begin_layout Standard +Esempio: un programma scarica una pagina web e lo passa ad un altro programma + che estrae degli URL e li passa ad un altro programma che scarica tali + url. + (hint: curl, grep, xargs+youtube-dl) +\end_layout + +\begin_layout BeginFrame +Alcuni filtri +\end_layout + +\begin_layout Itemize + +\family typewriter +cut +\end_layout + +\begin_layout Itemize + +\family typewriter +sort +\end_layout + +\begin_layout Itemize + +\family typewriter +uniq +\end_layout + +\begin_layout Itemize + +\family typewriter +wc +\end_layout + +\begin_layout Itemize + +\family typewriter +tee +\end_layout + +\begin_layout Itemize + +\family typewriter +head e tail +\end_layout + +\begin_layout Itemize + +\family typewriter +grep +\end_layout + +\begin_layout BeginFrame + +\family typewriter +cut +\end_layout + +\begin_layout Itemize +Estrae colonne delimitate da un carattere speciale da ogni riga di un file + +\end_layout + +\begin_layout Itemize + +\family typewriter +-d +\family default + -- specifica il delimitatore (default Tab) +\end_layout + +\begin_layout Itemize + +\family typewriter +-f +\family default + -- specifica quale colonna estrarre (one-based) +\end_layout + +\begin_layout BeginFrame + +\family typewriter +sort +\end_layout + +\begin_layout Itemize +Ordina le righe di un file +\end_layout + +\begin_layout Itemize + +\family typewriter +-k +\family default + -- specifica quali colonne del file usare come chiave per l'ordinamento +\end_layout + +\begin_layout Itemize + +\family typewriter +-t +\family default + -- specifica il delimitatore tra le colonne (default whitespace) +\end_layout + +\begin_layout BeginFrame + +\family typewriter +uniq +\end_layout + +\begin_layout Itemize +Stampa le righe uniche di un file +\bar under +già ordinato +\end_layout + +\begin_layout Itemize + +\family typewriter +-c +\family default + -- conta le occorrenze +\end_layout + +\begin_layout Itemize + +\family typewriter +-d +\family default + -- mostra solo i duplicati +\end_layout + +\begin_layout Itemize + +\family typewriter +-u +\family default + -- mostra solo i non duplicati +\end_layout + +\begin_layout BeginFrame + +\family typewriter +wc +\end_layout + +\begin_layout Itemize +Conta righe, parole e caratteri +\end_layout + +\begin_layout Itemize + +\family typewriter +-l +\family default + -- mostra solo il numero di righe +\end_layout + +\begin_layout Itemize + +\family typewriter +-w +\family default + -- mostra solo il numero di parole +\end_layout + +\begin_layout Itemize + +\family typewriter +-c +\family default + -- mostra solo il numero di caratteri +\end_layout + +\begin_layout BeginFrame + +\family typewriter +tee +\end_layout + +\begin_layout Itemize +Connette il suo stdin allo stdin di due o più file +\end_layout + +\begin_layout Itemize +Utile per mostrare l’output di un comando a schermo e darlo come input ad + un altro comando +\end_layout + +\begin_layout BeginFrame + +\family typewriter +head +\family default +e +\family typewriter + tail +\end_layout + +\begin_layout Itemize + +\family typewriter +head +\family default + mostra le prime 10 righe di un file, +\family typewriter +tail +\family default + le ultime 10 +\end_layout + +\begin_layout Itemize + +\family typewriter +-nX +\family default + -- mostra le prime/ultime X righe +\end_layout + +\begin_layout Itemize + +\family typewriter +tail -f +\family default + -- permette di +\begin_inset Quotes eld +\end_inset + +tenere d'occhio” un file a cui vengono continuamente aggiunte righe in coda + (ad esempio un log) +\end_layout + +\begin_layout BeginFrame + +\family typewriter +grep +\end_layout + +\begin_layout Standard +grep è uno dei filtri più potenti ed importanti di un sistema Unix. +\end_layout + +\begin_layout Standard +Mostra le righe di un file che corrispondono (o meno) ad un pattern (regular + expression +\begin_inset Foot +status open + +\begin_layout Plain Layout +\begin_inset Flex URL +status collapsed + +\begin_layout Plain Layout + +https://xkcd.com/208/ +\end_layout + +\end_inset + + +\end_layout + +\end_inset + +) +\end_layout + +\begin_layout Standard +Grep permette di ricevere in input del testo, una linea alla volta, ed effettuar +e delle ricerche con opportuni parametri all'interno di ogni linea, e stampare + il risultato. +\end_layout + +\begin_layout BeginFrame +grep (2) +\end_layout + +\begin_layout Itemize + +\family typewriter +-v +\family default + -- attiva il match invertito (mostra le righe che +\series bold +non +\series default + corrispondono) +\end_layout + +\begin_layout Itemize + +\family typewriter +-i +\family default + -- ricerca case insensitive +\end_layout + +\begin_layout Itemize + +\family typewriter +-c +\family default + -- conta i match +\end_layout + +\begin_layout Itemize + +\family typewriter +-l +\family default + -- mostra solo i nomi dei file con match +\end_layout + +\begin_layout Itemize + +\family typewriter +-r +\family default + -- ricerca ricorsivamente all'interno dei file a partire da una cartella +\end_layout + +\begin_layout Itemize + +\family typewriter +-E +\family default + -- usa le extended regular expression +\end_layout + +\begin_layout Itemize +-P -- usa PCRE, la sintassi per le espressioni regolari in stile Perl, presenti + nella maggior parte dei linguaggi di programmazione +\end_layout + +\begin_layout Itemize +-o -- mostra solo la parte di testo che matcha la regexp, non tutta la linea + (utile per estrarre del testo) +\end_layout + +\begin_layout BeginFrame +sed +\end_layout + +\begin_layout Standard +Sed è l'abbreviazione di +\series bold +s +\series default +tream +\series bold +ed +\series default +itor. + +\end_layout + +\begin_layout Standard +Trasforma ogni linea che legge dallo stdin in base ad una serie di istruzioni + date come argomenti al programma stesso, e stampa il risultato sullo stdout +\end_layout + +\begin_layout Standard +L'uso più comune è effettuare delle sostituzioni nel testo: +\end_layout + +\begin_layout Itemize +echo night | sed s/night/day/ +\end_layout + +\begin_deeper +\begin_layout Itemize +day +\end_layout + +\end_deeper +\begin_layout Standard +Ma può fare molto di più. +\end_layout + +\begin_layout Standard +Per maggiori informazioni consultate +\begin_inset CommandInset href +LatexCommand href +name "http://www.grymoire.com/Unix/Sed.html" +target "http://www.grymoire.com/Unix/Sed.html" + +\end_inset + + +\end_layout + +\begin_layout BeginFrame +awk +\end_layout + +\begin_layout Standard +Awk è un filtro che consente di estrapolare ed eventualmente aggregare dati + provenienti da un file o da un flusso (connesso allo stdin). +\end_layout + +\begin_layout Standard +Nella versione più semplice, awk può dividere una serie di linee in formato + tabulare ed effettuare delle operazioni su ogni elemento di ogni linea. +\end_layout + +\begin_layout Standard +Praticamente, un esempio: rilevare tutti i programmi che sta eseguendo un + utente: +\end_layout + +\begin_layout Itemize +ps aux | awk '$1 == +\begin_inset Quotes eld +\end_inset + +manu +\begin_inset Quotes erd +\end_inset + + {print $11}' +\end_layout + +\begin_layout Standard +Quando awk legge una linea, la spezza ad ogni occorrenza di un delimitatore + (lo spazio è il delimitatore predefinito, altrimenti è possibile specificare + un delimitatore personalizzato con l'opzione -F). + Alla variabile $0 viene assegnata l'intera linea, a $1 il primo elemento + della linea, a $2 il secondo e così via. +\end_layout + +\begin_layout BeginFrame +Awk (links) +\end_layout + +\begin_layout Standard +Effective AWK programming, il manuale della versione GNU di awk (quella + distribuita con quasi tutte le distribuzioni di GNU/Linux): +\end_layout + +\begin_layout Itemize +\begin_inset CommandInset href +LatexCommand href +name "https://www.gnu.org/software/gawk/manual/" +target "https://www.gnu.org/software/gawk/manual/" + +\end_inset + + +\end_layout + +\begin_layout Standard +Una buona guida ad awk: +\end_layout + +\begin_layout Itemize +\begin_inset CommandInset href +LatexCommand href +name "http://www.grymoire.com/Unix/Awk.html" +target "http://www.grymoire.com/Unix/Awk.html" + +\end_inset + + +\end_layout + +\begin_layout BeginFrame +Domande? +\end_layout + +\begin_layout Pause + +\end_layout + +\begin_layout Standard +\align center + +\size huge +Demo! +\end_layout + +\begin_layout Section* +Appendice +\end_layout + +\begin_layout Subsection* +Fonti +\end_layout + +\begin_layout BeginFrame +Per approfondire +\end_layout + +\begin_layout Standard +\align center +\begin_inset Graphics + filename admin.jpg + scale 30 + +\end_inset + + +\begin_inset Newline newline +\end_inset + +Google is your friend +\end_layout + +\begin_layout BeginFrame +Last call +\end_layout + +\begin_layout Standard +\align center + +\size largest +Domande? +\end_layout + +\begin_layout Subsection* +Licenza +\end_layout + +\begin_layout BeginFrame +Goodbye and thanks for all the fish +\end_layout + +\begin_layout Standard +\align center + +\size largest +Grazie per l'attenzione! +\begin_inset Newline newline +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Graphics + filename cc-by-sa.png + height 0.9cm + +\end_inset + + +\begin_inset Newline newline +\end_inset + + +\size footnotesize +Queste slides sono licenziate Creative Commons Attribution-ShareAlike 3.0 + Unported +\end_layout + +\begin_layout Standard +\align center + +\family typewriter +\begin_inset Flex URL +status open + +\begin_layout Plain Layout + +http://www.poul.org +\end_layout + +\end_inset + + +\end_layout + +\begin_layout EndFrame + +\end_layout + +\end_body +\end_document diff --git a/Corsi GNU Linux Avanzati/Bash e Filtri/admin.jpg b/Corsi GNU Linux Avanzati/Bash e Filtri/admin.jpg new file mode 100644 index 0000000..9c61dba Binary files /dev/null and b/Corsi GNU Linux Avanzati/Bash e Filtri/admin.jpg differ diff --git a/Corsi GNU Linux Avanzati/Bash e Filtri/cc-by-sa.png b/Corsi GNU Linux Avanzati/Bash e Filtri/cc-by-sa.png new file mode 100644 index 0000000..ef8a335 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Bash e Filtri/cc-by-sa.png differ diff --git a/Corsi GNU Linux Avanzati/Bash e Filtri/poul-logo.pdf b/Corsi GNU Linux Avanzati/Bash e Filtri/poul-logo.pdf new file mode 100644 index 0000000..995ce06 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Bash e Filtri/poul-logo.pdf differ diff --git a/Corsi GNU Linux Avanzati/Bash e Filtri/real_programmers.png b/Corsi GNU Linux Avanzati/Bash e Filtri/real_programmers.png new file mode 100644 index 0000000..f39c01a Binary files /dev/null and b/Corsi GNU Linux Avanzati/Bash e Filtri/real_programmers.png differ diff --git a/Corsi GNU Linux Avanzati/Bash e Filtri/vi-vim-cheat-sheet.gif b/Corsi GNU Linux Avanzati/Bash e Filtri/vi-vim-cheat-sheet.gif new file mode 100644 index 0000000..55da5f9 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Bash e Filtri/vi-vim-cheat-sheet.gif differ diff --git a/Corsi GNU Linux Avanzati/FHS e Filesystem/by-nc-sa.eu.svg b/Corsi GNU Linux Avanzati/FHS e Filesystem/by-nc-sa.eu.svg new file mode 100644 index 0000000..55157af --- /dev/null +++ b/Corsi GNU Linux Avanzati/FHS e Filesystem/by-nc-sa.eu.svg @@ -0,0 +1,57 @@ + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Corsi GNU Linux Avanzati/FHS e Filesystem/filesystem.lyx b/Corsi GNU Linux Avanzati/FHS e Filesystem/filesystem.lyx new file mode 100644 index 0000000..5b7cfe8 --- /dev/null +++ b/Corsi GNU Linux Avanzati/FHS e Filesystem/filesystem.lyx @@ -0,0 +1,4754 @@ +#LyX 2.0 created this file. For more info see http://www.lyx.org/ +\lyxformat 413 +\begin_document +\begin_header +\textclass beamer +\begin_preamble +\usetheme{Berkeley} +\usecolortheme{crane} +\usepackage{pifont} +\beamertemplatenavigationsymbolsempty +\end_preamble +\use_default_options true +\begin_modules +fixltx2e +\end_modules +\maintain_unincluded_children false +\language italian +\language_package default +\inputencoding auto +\fontencoding global +\font_roman palatino +\font_sans helvet +\font_typewriter courier +\font_default_family default +\use_non_tex_fonts false +\font_sc false +\font_osf false +\font_sf_scale 100 +\font_tt_scale 100 + +\graphics default +\default_output_format default +\output_sync 0 +\bibtex_command default +\index_command default +\paperfontsize default +\spacing single +\use_hyperref true +\pdf_bookmarks true +\pdf_bookmarksnumbered false +\pdf_bookmarksopen false +\pdf_bookmarksopenlevel 1 +\pdf_breaklinks false +\pdf_pdfborder false +\pdf_colorlinks true +\pdf_backref false +\pdf_pdfusetitle true +\papersize default +\use_geometry true +\use_amsmath 1 +\use_esint 1 +\use_mhchem 1 +\use_mathdots 1 +\cite_engine basic +\use_bibtopic false +\use_indices false +\paperorientation portrait +\suppress_date false +\use_refstyle 1 +\index Index +\shortcut idx +\color #008000 +\end_index +\secnumdepth 3 +\tocdepth 3 +\paragraph_separation indent +\paragraph_indentation default +\quotes_language french +\papercolumns 1 +\papersides 1 +\paperpagestyle default +\tracking_changes false +\output_changes false +\html_math_output 0 +\html_css_as_file 0 +\html_be_strict false +\end_header + +\begin_body + +\begin_layout Title +Dischi e Filesystem +\end_layout + +\begin_layout Date +27 marzo 2013 +\end_layout + +\begin_layout Author +Stefano Sanfilippo +\end_layout + +\begin_layout Institute +POuL -- Politecnico Open unix Labs, Corsi Linux Avanzati +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +AtBeginSection[]{ +\end_layout + +\begin_layout Plain Layout + + +\backslash +frame{ +\end_layout + +\begin_layout Plain Layout + + +\backslash +frametitle{Outline} +\end_layout + +\begin_layout Plain Layout + + +\backslash +tableofcontents[currentsection,currentsubsection] +\end_layout + +\begin_layout Plain Layout + + } +\end_layout + +\begin_layout Plain Layout + +} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Part +FHS +\end_layout + +\begin_layout Section +Definizione +\end_layout + +\begin_layout BeginFrame +FHS I +\end_layout + +\begin_layout Standard + +\emph on +FHS +\emph default + è lo standard per la struttura delle directory nei sistemi Linux. +\end_layout + +\begin_layout Standard +\align center +\begin_inset CommandInset href +LatexCommand href +target "http://www.pathname.com/fhs/" + +\end_inset + + +\end_layout + +\begin_layout Itemize +Estensione della gerachia BSD +\end_layout + +\begin_layout Itemize +Mantenuto dalla Linux Foundation +\end_layout + +\begin_layout Itemize +Versione attuale è la 2.3 (29 gennaio 2004) +\end_layout + +\begin_layout Itemize +Successore di FSSTND +\begin_inset Note Note +status open + +\begin_layout Plain Layout +14 febbraio 1994 +\end_layout + +\end_inset + + e +\family typewriter +hier +\end_layout + +\begin_layout Standard +\begin_inset Note Note +status open + +\begin_layout Plain Layout +Storia: Anni '70, hier (7), poi +\end_layout + +\end_inset + + +\end_layout + +\begin_layout BeginFrame +FHS II +\end_layout + +\begin_layout Standard +In pratica: definisce +\emph on +dove +\emph default +mettere +\emph on +cosa +\emph default +. +\end_layout + +\begin_layout Description +Regola +\begin_inset space ~ +\end_inset + +I tutti i files sono collocati sotto /, anche se memorizzati su dispositivi + fisici o virtuali differenti. +\end_layout + +\begin_layout Description +Regola +\begin_inset space ~ +\end_inset + +II non tutte le directory specificate devono essere presenti sul sistema. +\end_layout + +\begin_layout Description +Regola +\begin_inset space ~ +\end_inset + +III tutto è un file e se non è un file allora è un processo. + Anche i dispositivi di memoria (cfr. + C: +\backslash +, D: +\backslash + di Windows) sono files speciali. +\end_layout + +\begin_layout BeginFrame +FHS III +\end_layout + +\begin_layout Standard +Le principali distribuzioni sono FHS-compliant, ma presentano alcune piccole + deviazioni. +\end_layout + +\begin_layout Standard +\begin_inset Float table +wide false +sideways false +status open + +\begin_layout Plain Layout +\align center +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout +Distribuzione +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Riferimento +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +Debian +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset CommandInset href +LatexCommand href +name "debian.org" +target "http://www.debian.org/doc/debian-policy/ch-opersys.html" + +\end_inset + + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +SuSe +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\begin_inset CommandInset href +LatexCommand href +name "novell.com" +target "http://www.novell.com/documentation/suse91/suselinux-adminguide/html/ch12.html" + +\end_inset + + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +RHEL/Fedora +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset CommandInset href +LatexCommand href +name "redhat.com" +target "http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/html/Deployment_Guide/s1-filesystem-fhs.html" + +\end_inset + + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +Ubuntu +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset CommandInset href +LatexCommand href +name "ubuntu.com" +target "https://help.ubuntu.com/community/LinuxFilesystemTreeOverview" + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Plain Layout +\begin_inset Caption + +\begin_layout Plain Layout +Compliance delle principali distribuzioni +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Note Note +status open + +\begin_layout Plain Layout +Colorare link! +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{ +\end_layout + +\end_inset + +Ma non tutte!! +\begin_inset ERT +status open + +\begin_layout Plain Layout + +} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +Ad esempio, +\begin_inset CommandInset href +LatexCommand href +name "GoboLinux" +target "http://en.wikipedia.org/wiki/GoboLinux" + +\end_inset + + +\end_layout + +\begin_layout Section +Struttura +\end_layout + +\begin_layout Subsection +Generale +\end_layout + +\begin_layout BeginFrame +Gerarchia +\end_layout + +\begin_layout Standard +\align left +\begin_inset Float table +wide false +sideways false +status open + +\begin_layout Plain Layout +\align left +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout +Percorso +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Contenuto +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/ +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +cartella +\emph on +root +\emph default +, la +\emph on +radice +\emph default + del filesystem. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/boot +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +files di avvio: bootloader, kernel e initrd. + +\begin_inset Note Note +status collapsed + +\begin_layout Plain Layout +Qualcuno ha spiegato cosa sono? +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/etc +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +files di configurazione del sistema +\begin_inset Note Note +status collapsed + +\begin_layout Plain Layout +Non sono ammessi binari in questa cartella, Verificare +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/home +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +cartelle personali degli utenti +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/media +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +punto di mount per i filesystem esterni (cd\SpecialChar \ldots{} +) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/mnt +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +punto di mount per i filesystem interni temporanei +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/opt +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +pacchetti software +\emph on +opz +\emph default +ionali (concetto elastico) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/root +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +home dell'utente root +\begin_inset Note Note +status open + +\begin_layout Plain Layout +perché fuori? +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/usr +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +eseguibili e librerie per le applicazioni utente +\begin_inset Note Note +status open + +\begin_layout Plain Layout +read only +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/var +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +dati (mutabili), log e cache di sistema +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +/usr e /var contengono delle sottogerarchie. +\end_layout + +\begin_layout Subsection +Eseguibili +\end_layout + +\begin_layout BeginFrame +Gerarchia per eseguibili e librerie +\end_layout + +\begin_layout Standard +\begin_inset Flex Structure +status collapsed + +\begin_layout Plain Layout +FHS specifica una gerachia a +\emph on +tre livelli +\end_layout + +\end_inset + + +\emph on +: +\emph default + eseguibili e librerie possono comparire in tre punti del filesystem: +\end_layout + +\begin_layout Standard +\begin_inset Float table +wide false +sideways false +status open + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout +/ +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +essenziali al funzionamento del sistema +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/usr +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +applicazioni utente +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/usr/local +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +applicazioni locali (installate a mano\SpecialChar \ldots{} +) +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Flex Structure +status collapsed + +\begin_layout Plain Layout +In ciascun percorso +\end_layout + +\end_inset + +, i binari sono suddivisi in 3 cartelle: +\end_layout + +\begin_layout Standard +\begin_inset Float table +wide false +sideways false +status open + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout +\SpecialChar \ldots{} +/bin +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +binari +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\SpecialChar \ldots{} +/lib +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +librerie +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\SpecialChar \ldots{} +/sbin +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +binari di sistema +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{ +\end_layout + +\end_inset + +Perché separare bin e sbin? +\begin_inset ERT +status open + +\begin_layout Plain Layout + +} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +Di solito, i binari in \SpecialChar \ldots{} +/sbin richiedono privilegi di amministratore per + funzionare. +\begin_inset Note Note +status open + +\begin_layout Plain Layout +Nota poi +\end_layout + +\end_inset + + +\end_layout + +\begin_layout BeginFrame +Gerarchia /usr +\end_layout + +\begin_layout Standard +Oltre a /sbin, /bin e /lib, contiene +\end_layout + +\begin_layout Standard +\begin_inset Float table +wide false +sideways false +status open + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout +/usr/include +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Include files (cfr. + *.h del C/C++) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/usr/share +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Dati delle applicazioni (immagini, suoni\SpecialChar \ldots{} +) +\begin_inset Note Note +status collapsed + +\begin_layout Plain Layout +sottogerarchia? +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/usr/src +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Codice sorgente (es. + kernel) +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +A sua volta, /usr/share contiene cartelle standard (consuetudine, non coperte + da FHS +\begin_inset Note Note +status open + +\begin_layout Plain Layout +controllare +\end_layout + +\end_inset + +): +\end_layout + +\begin_layout Itemize +\SpecialChar \ldots{} +/icons +\end_layout + +\begin_layout Itemize +\SpecialChar \ldots{} +/wallpapers +\end_layout + +\begin_layout Itemize +\SpecialChar \ldots{} +/sounds +\end_layout + +\begin_layout Itemize +\SpecialChar \ldots{} +/pixmaps (icone e immagini dei programmi) +\end_layout + +\begin_layout Itemize +\SpecialChar \ldots{} +/doc +\end_layout + +\begin_layout Standard +E altre cartelle (specifiche per i singoli programmi, es. + \SpecialChar \ldots{} +/amarok/) +\end_layout + +\begin_layout Subsection +Speciali +\end_layout + +\begin_layout BeginFrame +FS speciali +\end_layout + +\begin_layout Standard +Non sono vere +\begin_inset Quotes fld +\end_inset + +cartelle +\begin_inset Quotes frd +\end_inset + +, ma rappresentazioni virtuali di alcuni aspetti del sistema, nello spirito + della Regola III (tutto è un file). +\end_layout + +\begin_layout Standard +\begin_inset Float table +wide false +sideways false +status open + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout +/dev +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +riferimenti ai dispositivi +\begin_inset Note Note +status collapsed + +\begin_layout Plain Layout +Differenza con ls, +\emph on +file speciali +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/proc +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +informazioni sui processi e sul kernel +\begin_inset Note Note +status collapsed + +\begin_layout Plain Layout +giochino con /proc +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +Sono il punto di mount di FS opportuni. +\end_layout + +\begin_layout BeginFrame +Files temporanei +\end_layout + +\begin_layout Block +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{Regola} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Block +se vanno persi, il sistema non ne sentirà la mancanza. + Sono memorizzati in due posizioni diverse, a seconda del tempo di persistenza +\end_layout + +\begin_layout Standard +\begin_inset Float table +wide false +sideways false +status open + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout +/tmp +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Cancellata ad ogni riavvio (o anche in corsa) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/var/tmp +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Persistente +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout BeginFrame +Files variabili +\end_layout + +\begin_layout Standard +Dati condivisi delle applicazioni durante il normale funzionamento. +\end_layout + +\begin_layout Standard +\begin_inset Float table +wide false +sideways false +status open + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout +/var/cache +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Cache di sistema (velocizzano applicazioni) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/var/lib +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Informazioni di stato +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/var/lock +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Lock files +\begin_inset Note Note +status open + +\begin_layout Plain Layout +tieni traccia uso delle risorse +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/var/log +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Log di sistema (demoni, firewall, accessi\SpecialChar \ldots{} +) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/var/run +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Informazioni sul sistema (utenti connessi\SpecialChar \ldots{} +) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/var/spool +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Coda per le operazioni lunghe (stampa, mail\SpecialChar \ldots{} +) +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{Problema} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +/var spesso è montato come una partizione separata, quindi potrebbe non + essere accessibile nelle prime fasi di avvio. + +\begin_inset Note Note +status collapsed + +\begin_layout Plain Layout +No trucchetti come /dev/.systemd +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Subsection +Deviazioni dallo standard +\end_layout + +\begin_layout BeginFrame +Deviazioni dallo standard +\end_layout + +\begin_layout Standard +Le moderne distribuzioni Linux creano altre due directory, non standard: +\end_layout + +\begin_layout Description +/run come /var/run, ma montata come filesystem virtuale, +\begin_inset Flex Alert +status collapsed + +\begin_layout Plain Layout +subito accessibile +\end_layout + +\end_inset + +. +\end_layout + +\begin_layout Description +/sys contiene i parametri del kernel e le opzioni per configurarne il funzioname +nto. +\begin_inset Flex Structure +status collapsed + +\begin_layout Plain Layout + NOTA +\end_layout + +\end_inset + +: sui vecchi unix, era un collegamento al codice sorgente del kernel. +\end_layout + +\begin_layout Block +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Block +Alcune distribuzioni (cfr. + Archlinux e Fedora) appiattiscono la gerarchia a tre livelli degli eseguibli: +\begin_inset Note Note +status collapsed + +\begin_layout Plain Layout +Gestione facile, monto in lettura +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Itemize +/lib, /sbin e /bin potrebbero essere collegamenti a /usr/\SpecialChar \ldots{} + +\end_layout + +\end_deeper +\begin_layout Part +Gestione di filesystem +\end_layout + +\begin_layout Section +Dispositivi +\end_layout + +\begin_layout BeginFrame +Dispositivi (file speciali) +\end_layout + +\begin_layout Standard +Distinguiamo tre tipi diversi di dispositivo: +\end_layout + +\begin_layout Description +A +\begin_inset space ~ +\end_inset + +blocchi operazioni di I/O per +\emph on +blocchi +\emph default + di dimensione predeterminata ( +\begin_inset Flex Structure +status collapsed + +\begin_layout Plain Layout +es. +\end_layout + +\end_inset + + hard disk, che si leggono a settori -- p.e. + di 4KB) +\end_layout + +\begin_layout Description +A +\begin_inset space ~ +\end_inset + +caratteri operazioni di I/O per singoli byte (o, comunque, senza blocchi + di dimensione fissata) ( +\begin_inset Flex Structure +status collapsed + +\begin_layout Plain Layout +es. +\end_layout + +\end_inset + + standard output) +\end_layout + +\begin_layout Description +Speciali sono +\begin_inset Quotes fld +\end_inset + +astrazioni +\begin_inset Quotes frd +\end_inset + +, non necessariamente legate ai dispositivi di I/O. +\end_layout + +\begin_layout Standard +Per ragioni di sicurezza, i dispositivi possono essere creati solo da root +\begin_inset Note Note +status open + +\begin_layout Plain Layout +con mknod +\end_layout + +\end_inset + + e non sono direttamente accessibili ai normali utenti. +\end_layout + +\begin_layout Section +Partizioni +\end_layout + +\begin_layout BeginFrame +Partizioni +\end_layout + +\begin_layout Standard +Sono le suddivisioni del disco. + Ogni disco deve avere almeno una partizione, sulla quale si può creare + il FS. + Esistono due schemi di partizioni, che tengono traccia del punto in cui + ogni p. + inizia e del tipo di FS che contengono: +\end_layout + +\begin_layout Description +MBR legacy, la struttura dati precede la prima partizione. + La tabella delle partizioni descrive al massimo 4 partizioni fisiche, di + 2TiB +\begin_inset Note Note +status collapsed + +\begin_layout Plain Layout +entry a 32bit, settori di 512B +\end_layout + +\end_inset + + l'una al massimo. + Sono state aggiunte le partizioni logiche, memorizzate in una lista concatenata + ( +\begin_inset Flex Alert +status collapsed + +\begin_layout Plain Layout +se si danneggia il record di una, si perdono i dati delle seguenti +\end_layout + +\end_inset + +) +\end_layout + +\begin_layout Description +GPT usata su UEFI e su alcuni sistemi BIOS. + Innalza i limiti di MBR (128 partizioni, max 8ZiB) +\end_layout + +\begin_layout Standard +Notare che i due schemi possono coesistere +\end_layout + +\begin_layout Section +mount e umount +\end_layout + +\begin_layout BeginFrame +mount +\end_layout + +\begin_layout Itemize +Ogni dispositivo ha un file speciale corrispondente nella cartella /dev. +\begin_inset Note Note +status open + +\begin_layout Plain Layout +mostrare con ls +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Itemize +I dispositivi sono direttamente leggibili e scrivibili (ad esempio, standard + input), ma a volte sono disponibili interfacce di livello superiore, specialmen +te se la lettura/scrittura avviene secondo un protocollo. +\end_layout + +\begin_layout Itemize +Per accedere ai dati contenuti in un dispositivo a blocchi (i files), bisogna + +\begin_inset Quotes fld +\end_inset + +montarlo +\begin_inset Quotes frd +\end_inset + +. +\end_layout + +\begin_layout Standard +Il comando per montare i filesystem è +\begin_inset Flex Structure +status collapsed + +\begin_layout Plain Layout +mount +\end_layout + +\end_inset + +: +\end_layout + +\begin_layout Standard + +\family typewriter +# mount $nome_device $punto_di_mount +\end_layout + +\begin_layout ExampleBlock +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout ExampleBlock +Eseguire mount senza argomenti mostrerà i FS attualmente montati, con le + relative opzioni. +\end_layout + +\begin_layout BeginFrame +umount +\end_layout + +\begin_layout Standard +\align left +È il comando simmetrico: serve a +\begin_inset Quotes fld +\end_inset + +smontare +\begin_inset Quotes frd +\end_inset + + un dispositivo, in modo da effettuare una rimozione sicura e indolore: +\begin_inset Newline newline +\end_inset + + +\family typewriter +# umount $punto_di_mount +\begin_inset Newline newline +\end_inset + +# umount $nome_device +\end_layout + +\begin_layout AlertBlock +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +Non è un errore, il comando è umount, non u +\emph on +n +\emph default +mount! +\end_layout + +\begin_layout Section +fuser +\end_layout + +\begin_layout BeginFrame +fuser +\end_layout + +\begin_layout Standard +Non è possibile smontare un filesystem occupato (es. + c'è un trasferimento di file in corso), in tal caso si usa +\begin_inset Flex Structure +status collapsed + +\begin_layout Plain Layout +fuser +\end_layout + +\end_inset + + per mostrare il PID dei programmi che stanno usando il dispositivo. +\end_layout + +\begin_layout Description +# +\begin_inset space ~ +\end_inset + +fuser +\begin_inset space ~ +\end_inset + +/nome/del/file PID dei processi che hanno aperto +\emph on +il file +\emph default +specificato +\end_layout + +\begin_layout Description +# +\begin_inset space ~ +\end_inset + +fuser +\begin_inset space ~ +\end_inset + +-c +\begin_inset space ~ +\end_inset + +$punto_di_mount PID dei processi che stanno usando un +\emph on +qualsiasi +\emph default + file nel dispositivo montato alla posizione specificata. +\end_layout + +\begin_layout AlertBlock +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{Attenzione!} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +I comandi precedenti vanno eseguiti da root, altrimenti non avranno effetto! +\end_layout + +\begin_layout BeginFrame +df +\end_layout + +\begin_layout Standard +Indica quanto spazio libero rimane su ogni partizione. + Viene spesso usato con l'opzione +\emph on +-h +\emph default +, che riporta le misure in unità +\begin_inset Quotes fld +\end_inset + + +\emph on +h +\emph default +uman-readable +\begin_inset Quotes frd +\end_inset + + +\begin_inset Note Note +status open + +\begin_layout Plain Layout +df con e senza -h +\end_layout + +\end_inset + + +\begin_inset Newline newline +\end_inset + + +\family typewriter +$ df +\begin_inset Newline newline +\end_inset + +$ df -h +\end_layout + +\begin_layout AlertBlock +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +Lo spazio libero non corrisponde alla differenza tra la capacità massima + e la somma della dimensione dei files! (una parte potrebbe essere riservata). +\begin_inset Note Note +status open + +\begin_layout Plain Layout +e2fs... +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Section +Notazione +\end_layout + +\begin_layout BeginFrame +Notazione per i dispositivi I +\end_layout + +\begin_layout Standard +I dispositivi compaiono nella cartella /dev e hanno +\emph on +nomi convenzionali. +\end_layout + +\begin_layout AlertBlock +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +Le notazioni riguardano +\emph on +solo +\emph default +Linux! (es. + BSD usa altre convenzioni). +\begin_inset Note Note +status open + +\begin_layout Plain Layout +es. + wd0 +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Float table +wide false +sideways false +status open + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + + +\begin_inset Text + +\begin_layout Plain Layout +Dispositivo +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Input +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Output +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/dev/null +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Scarta l'input +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +N/A +\begin_inset Note Note +status open + +\begin_layout Plain Layout +utile per scartare +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/dev/zero +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Flusso continuo di NULL +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/dev/full +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Quotes fld +\end_inset + +Disco pieno +\begin_inset Quotes frd +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/dev/random +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +N/A +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Flusso +\emph on + truly random +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/dev/urandom +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Flusso pseudorandom +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Plain Layout +\begin_inset Caption + +\begin_layout Plain Layout +Dispositivi speciali +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout BeginFrame +Notazione per i dispositivi II +\end_layout + +\begin_layout Standard +I dischi PATA/SATA (la quasi totalità di quelli usati attualmente) usano + una prefisso +\emph on +sd +\emph default +e una convenzione a due livelli: +\end_layout + +\begin_layout Standard +\begin_inset Float figure +wide false +sideways false +status open + +\begin_layout Plain Layout +\begin_inset Graphics + filename filesystem.svg + width 80page% + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +Su MBR, la prima partizione logica è sempre sdX5 +\end_layout + +\begin_layout BeginFrame +Notazione per i dispositivi III +\end_layout + +\begin_layout Standard +\begin_inset Float table +wide false +sideways false +status open + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout +Framebuffer +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +/dev/fb +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +CD-ROM +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +/dev/cdromX +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +Lettori Floppy Disk +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +/dev/fdX +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +Terminali virtuali +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +/dev/ptX +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +Terminali +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +/dev/ttyX, ttyS (seriale), ttyUSBX +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +Loop +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +/dev/loopX +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Plain Layout +\begin_inset Caption + +\begin_layout Plain Layout +Altri nomi, con X +\emph on +numero progressivo +\emph default +del dispositivo +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +/dev/stdin, /dev/stdout e /dev/stderr sono file! +\begin_inset Note Note +status open + +\begin_layout Plain Layout +Esercizio per verificare che sia così +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset VSpace bigskip +\end_inset + + +\end_layout + +\begin_layout Standard +Esistono ancora altri nomi, meno usati (legacy o rari), non li tratteremo + (e Google è vostro amico ☺) +\end_layout + +\begin_layout Section +Loop +\end_layout + +\begin_layout BeginFrame +Loop +\end_layout + +\begin_layout Standard +Pseudo-device che rende un file accessibile come se fosse un dispositivo + a blocchi. +\end_layout + +\begin_layout Itemize +Utile per montare immagini di dischi o chiavette senza doverle masterizzare. +\end_layout + +\begin_layout Itemize +Su Linux, mount si occupa di tutto, deve solo essere informato con l'opzione + loop: +\end_layout + +\begin_deeper +\begin_layout Itemize + +\family typewriter +# mount -o loop nome_file punto_di_mount +\end_layout + +\end_deeper +\begin_layout Section +UDev +\end_layout + +\begin_layout BeginFrame +UDev +\end_layout + +\begin_layout Itemize +Su unix classico, i dispositivi vengono creati con mknod. +\end_layout + +\begin_layout Itemize +Sui sistemi Linux moderni i dispositivi a blocchi sono creati e gestiti + automagicamente da un demone, UDev. +\end_layout + +\begin_deeper +\begin_layout Itemize +Udev ascolta gli eventi di sistema (uevent, appunto) e reagisce opportunamente. +\end_layout + +\begin_layout Itemize +È un componente articolato, ma non ce ne occuperemo. + +\emph on +Sappiate che esiste +\emph default + +\emph on +e funziona +\emph default +. +\end_layout + +\end_deeper +\begin_layout ExampleBlock +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout ExampleBlock +Quando attaccate una chiavetta, viene creato automaticamente /dev/sdb1 +\end_layout + +\begin_layout Section +Hard e soft link +\end_layout + +\begin_layout BeginFrame +Hard e soft link +\end_layout + +\begin_layout Enumerate +Nel FS, i files sono rappresentati da inode. + Un file nel FS è un link ad un inode. +\end_layout + +\begin_layout Enumerate +Un +\begin_inset Flex Structure +status collapsed + +\begin_layout Plain Layout +hard link +\end_layout + +\end_inset + + crea un altro link allo stesso inode. +\end_layout + +\begin_deeper +\begin_layout Itemize +Quando cancellate un file, viene rimosso un link all'inode. + L'inode viene marcato come cancellabile quando non ci sono più hard link + che lo puntano. +\end_layout + +\end_deeper +\begin_layout Enumerate +Un +\begin_inset Flex Structure +status collapsed + +\begin_layout Plain Layout +soft link +\end_layout + +\end_inset + + è un collegamento ad un altro nome nel FS. +\end_layout + +\begin_layout Enumerate +Spostare o rinominare un file non influenzerà un hard link, perché è un + collegamento all'inode (e i cambiamenti all'inode si riflettono su tutti + gli hard link). +\end_layout + +\begin_layout Enumerate +Gli hard link sono validi solo nello stesso FS, mentre i soft link possono + espandarsi ad altri FS (essendo semplici riferimenti al nome del file). +\end_layout + +\begin_layout Section +fstab +\end_layout + +\begin_layout BeginFrame +fstab +\end_layout + +\begin_layout Itemize +fstab elenca tutti i dispositivi disponibili sul sistema e indica come vanno + inizializzati o integrati nel FS del sistema. +\end_layout + +\begin_layout Itemize +È usato ancora per la configurazione dell'hard disk principale e i FS di + startup, ma +\begin_inset Flex Alert +status collapsed + +\begin_layout Plain Layout +è stato soppiantato +\end_layout + +\end_inset + + da UDev per i dispositivi esterni. +\end_layout + +\begin_layout ExampleBlock +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{ +\end_layout + +\end_inset + +Linea di /etc/fstab +\begin_inset ERT +status open + +\begin_layout Plain Layout + +} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout ExampleBlock + +\family typewriter +\size small +# device name mpoint fs-type options dump-freq pass-num +\begin_inset Note Note +status open + +\begin_layout Plain Layout + +\family typewriter +\size small +Esercizio su scrivere fstab +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Section +Organizzazione +\end_layout + +\begin_layout BeginFrame +Organizzazione +\end_layout + +\begin_layout Standard +Uno schema su disco usuale prevede più partizioni per gestire meglio i dati. + Non ci sono regole assolute -- dipende dall'uso che la distribuzione fa + di ciascuna partizione. +\end_layout + +\begin_layout Standard +\begin_inset Float table +wide false +sideways false +status open + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + + +\begin_inset Text + +\begin_layout Plain Layout +Percorso +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Dimensioni consigliate +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Motivo primo +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/ +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +10~20GB +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Applicazioni installate +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/boot +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +50MB~100MB +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Numero di kernel +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/home +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +? +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Utente +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +/var +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +5~10G +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Cache varie +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{} +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Itemize +\begin_inset space ~ +\end_inset + + +\begin_inset Quotes fld +\end_inset + +Partizionate +\begin_inset Quotes frd +\end_inset + + l'uso del disco! Es. + Separare /var/mail limita l'effetto dello spam. +\end_layout + +\begin_layout Itemize +Se possibile, lasciare un po' di spazio libero per futuri assestamenti. +\end_layout + +\end_deeper +\begin_layout Section +S.M.A.R.T. +\end_layout + +\begin_layout BeginFrame +S.M.A.R.T. +\end_layout + +\begin_layout Standard +I dischi rigidi (quasi tutti) hanno un sistema di diagnostica interna, detto + S\SpecialChar \@. +M\SpecialChar \@. +A\SpecialChar \@. +R\SpecialChar \@. +T\SpecialChar \@. +, che fornisce diversi indicatori di affidabilità per anticipare i + guasti e salvaguardare i dati. + Alcuni dati forniti da S\SpecialChar \@. +M\SpecialChar \@. +A\SpecialChar \@. +R\SpecialChar \@. +T\SpecialChar \@. + sono: +\end_layout + +\begin_layout Itemize +Temperatura +\end_layout + +\begin_layout Itemize +Numero di settori danneggiati +\end_layout + +\begin_layout Itemize +Ore di funzionamento +\end_layout + +\begin_layout Standard +Possono essere visualizzati con strumenti appositi: +\begin_inset Flex Structure +status collapsed + +\begin_layout Plain Layout +smartctl +\end_layout + +\end_inset + + (CLI), +\begin_inset Flex Structure +status collapsed + +\begin_layout Plain Layout +gsmartcontrol +\end_layout + +\end_inset + + e +\begin_inset Flex Structure +status collapsed + +\begin_layout Plain Layout +palimpsest +\end_layout + +\end_inset + + (grafici). +\end_layout + +\begin_layout Standard +\begin_inset Float figure +wide false +sideways false +status open + +\begin_layout Plain Layout +\begin_inset Graphics + filename palimpsest.png + height 20pheight% + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Part +Tipi di Filesystem +\end_layout + +\begin_layout Section +FS overview +\end_layout + +\begin_layout BeginFrame +Concetti di base I +\end_layout + +\begin_layout Standard +\begin_inset Note Note +status open + +\begin_layout Plain Layout +Senza pretesa di coprire ciascun argomento in modo esaustivo, dovete conoscere + il significato di alcuni termini +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Description +Checksumming calcolo di codici di controllo per dati e metadati, dà una + certa resistenza alle +\begin_inset Quotes fld +\end_inset + +silent corruptions +\begin_inset Quotes frd +\end_inset + + +\end_layout + +\begin_layout Description +Deduplicazione mappatura di copie identiche della stessa risorsa sullo stesso + blocco (cfr. + COW) +\end_layout + +\begin_layout Description +Copy +\begin_inset space ~ +\end_inset + +on +\begin_inset space ~ +\end_inset + +Write +\begin_inset space ~ +\end_inset + +(COW) creazione +\begin_inset Quotes fld +\end_inset + +al volo +\begin_inset Quotes frd +\end_inset + + di una copia delle risorse condivise, in caso di modifica unilaterale (duplico + solo se necessario). +\end_layout + +\begin_layout BeginFrame +Concetti di base II +\end_layout + +\begin_layout Description +Frammentazione Suddivisione di un file in più blocchi o gruppi di blocchi + non contigui. + Rallenta I/O su dischi a rotazione (obbliga ad un seek), sfrutta meglio + lo spazio (tappa i buchi). +\end_layout + +\begin_layout Description +Deframmentazione Rimozione della f., ottenuta muovendo i blocchi per rendere + contiguo il più grande numero possibile (100% limite teorico). +\begin_inset Note Note +status open + +\begin_layout Plain Layout +Solo dischi a rotazione, conta qualcosa su SSD? +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Description +Extent area di memorizzazione contigua (blocchi contigui) riservata per + un file. + Riduce la frammentazione. + +\begin_inset Note Note +status collapsed + +\begin_layout Plain Layout +Quando si scrive di nuovo sul file, i dati vengono scritti a partire dagli + ultimi. +\end_layout + +\end_inset + + +\end_layout + +\begin_layout BeginFrame +Concetti di base III +\end_layout + +\begin_layout Description +Journaling scrittura su disco per transazioni (come nei DB) per garantire + correttezza e consistenza del FS in caso di cadute di tensione. +\end_layout + +\begin_deeper +\begin_layout Itemize +Le operazioni (metadati) vengono inserite nel +\begin_inset Flex Structure +status collapsed + +\begin_layout Plain Layout +log +\end_layout + +\end_inset + + (un'area riservata del FS), poi applicate. + Ogni successo/fallimento viene registrato. + In caso di spegnimento, Linux analizza il log e prende opportune misure. +\end_layout + +\end_deeper +\begin_layout BeginFrame +Concetti di base IV +\end_layout + +\begin_layout Description +Mirroring copia esatta del contenuto del FS: in caso di rottura del disco, + potrà essere sostituito e ripristinato. +\begin_inset Note Note +status open + +\begin_layout Plain Layout +Esistono più strumenti +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Description +Quota quantità massima di spazio sul FS usabile da un utente, gruppo, processo + (o una combinazione). +\end_layout + +\begin_layout Description +Wear +\begin_inset space ~ +\end_inset + +leveling +\begin_inset space ~ +\end_inset + +(TRIM) distribuzione dell'uso delle celle di memoria su un SSD, per bilanciare + l'usura della flash. + Viene effettuata dall'hardware, ma ha bisogno della collaborazione del + SO (che deve sapere e indicare quali blocchi non sono più in uso). +\end_layout + +\begin_layout BeginFrame +Principali FS +\end_layout + +\begin_layout Standard +In uso attuale, sono diffusi 5 filesystem: +\begin_inset Note Note +status open + +\begin_layout Plain Layout +max dimensione +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Float table +wide false +sideways false +status open + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + + + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\size tiny +Nome +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\size tiny +Stato +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\size tiny +Journal +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\size tiny +COW +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\size tiny +C'sum +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\size tiny +Dedupe +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\size tiny +Defrag +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\size tiny +Mirror +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\size tiny +Quota +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\size tiny +ext4 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\size tiny +stabile +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +checkmark +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +~{} +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +ding{55} +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +ding{55} +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +checkmark +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +ding{55} +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +checkmark +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\size tiny +btrfs +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\size tiny +\begin_inset Quotes fld +\end_inset + +testing +\begin_inset Quotes frd +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +checkmark +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +checkmark +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +checkmark +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +checkmark +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +~{} +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +checkmark +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +~{} +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\size tiny +zfs +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\size tiny +stabile +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +checkmark +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +checkmark +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +checkmark +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +checkmark +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +checkmark +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +checkmark +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +checkmark +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\size tiny +vfat +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\size tiny +legacy +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +ding{55} +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +ding{55} +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +ding{55} +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +ding{55} +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +ding{55} +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +ding{55} +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +ding{55} +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\size tiny +ntfs +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\size tiny +legacy +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +checkmark +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +ding{55} +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset CommandInset href +LatexCommand href +name "?" +target "http://serverfault.com/questions/186788/does-windows-have-a-checksumming-filesystem-like-zfs-or-btrfs" + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +ding{55} +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +~{} +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +~{} +\end_layout + +\end_inset + + +\begin_inset Note Note +status collapsed + +\begin_layout Plain Layout +Richiede DFS +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +checkmark +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Note Note +status open + +\begin_layout Plain Layout +fsck +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +VFAT DEVE essere EVITATO su qualsiasi disco fisso, ma è utile per chiavette + (compatibile con Windows): no Journal!! +\end_layout + +\begin_layout BeginFrame +Note +\end_layout + +\begin_layout Enumerate +ZFS non può essere distribuito assieme al Kernel di Linux per questione + di licenza. + Va installato a parte. +\end_layout + +\begin_layout Enumerate +EXT4 è stabile. + BTRFS (che lo rimpiazzerà) è dichiarato sperimentale, ma il formato su + disco è stabile -- salvo +\begin_inset Quotes fld +\end_inset + +bug che rendano la modifica assolutamente necessaria +\begin_inset Quotes frd +\end_inset + +. + Se i dati memorizzati non sono essenziali (es. + backup), è consigliato provarlo. +\end_layout + +\begin_layout Enumerate +BTRFS e ZFS offrono circa le stesse caratteristiche, ma ZFS è nato nel mondo + OpenSolaris, BTRFS in quello Linux. +\end_layout + +\begin_layout Enumerate +Un volume EXT4 può essere convertito in BTRFS: è possibile installare EXT4 + e, in futuro, convertire. +\end_layout + +\begin_layout Enumerate +BTRFS e ZFS supportano la compressione trasparente, ma è consigliata solo + in sistemi multi-core/CPU, dove l'overhead è difficilmente notato (1 core + == NO!) +\end_layout + +\begin_layout Section +FS virtuali +\end_layout + +\begin_layout BeginFrame +FS speciali +\end_layout + +\begin_layout Description +procfs montato in /proc, fornisce informazioni sui processi attivi, sotto + forma di pseudo-FS (es. + /proc/$PID) +\end_layout + +\begin_layout Description +sysfs montato in /sys, permette di modificare i parametri del kernel e apprender +e la configurazione del sistema. +\end_layout + +\begin_layout Description +tmpfs FS creato nella RAM, utile per /run, /var/lock e altre strutture +\begin_inset Quotes fld +\end_inset + +piccole +\begin_inset Quotes frd +\end_inset + + (RAM limitata) che hanno bisogno di velocità ma non devono resistere al + reboot +\end_layout + +\begin_layout Description +aufs raggruppa più FS, facendoli apparire come un solo FS virtuale. + Successore di unionfs. +\begin_inset Note Note +status open + +\begin_layout Plain Layout +Perché??? +\end_layout + +\end_inset + + +\end_layout + +\begin_layout BeginFrame +Altri FS +\end_layout + +\begin_layout Description +squashfs FS compresso in sola lettura. + Viene spesso usato nei Live CD, facendo risparmiare spazio. +\end_layout + +\begin_layout Description +ISO +\begin_inset space ~ +\end_inset + +9660 +\begin_inset space ~ +\end_inset + +(e +\begin_inset space ~ +\end_inset + +UDF) FS in sola lettura usato nei CD dati. + UDF è il successore (usato nei CD-RW e nei DVD) +\end_layout + +\begin_layout Description +eCryptfs overlay che supporta la cifratura trasparente a livello di singoli + file e path (es. + si può abilitare solo per una cartella). +\end_layout + +\begin_layout Part +Tecnologie +\end_layout + +\begin_layout Section +LUKS +\end_layout + +\begin_layout BeginFrame +LUKS +\end_layout + +\begin_layout Standard +Permette la cifratura del disco. + Una partizione LUKS può contenere qualsiasi filesystem, la cifratura avviene + al livello dei singoli blocchi (al contrario di eCryptFS). +\end_layout + +\begin_layout Block +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Block +La modalità di funzionamento consigliata è AES256 (512 bit), XTS-plain64. +\end_layout + +\begin_layout BeginFrame +Perché cifrare? +\end_layout + +\begin_layout Enumerate +In caso di furto del laptop, nessuno (CIA?) potrà leggerne il contenuto +\end_layout + +\begin_deeper +\begin_layout Itemize +fotografie, email, etc. + sono al sicuro +\end_layout + +\begin_layout Itemize +account e password salvate pure! +\end_layout + +\end_deeper +\begin_layout Enumerate +Niente bisogno di cancellare il disco se dovesse andare in +\begin_inset Quotes fld +\end_inset + +manutenzione +\begin_inset Quotes frd +\end_inset + + o essere rivenduto. +\end_layout + +\begin_layout Enumerate +Riduce la possibilità di manomissione criminale +\end_layout + +\begin_deeper +\begin_layout Itemize +injecting limitato al booloader/immagine del kernel. +\end_layout + +\end_deeper +\begin_layout Enumerate +In alcuni casi (studi medici, etc.) è un obbligo di Legge. +\end_layout + +\begin_layout Enumerate +Protegge i dati sui vostri server (probabilmente ospitati in una server + farm) da sguardi indiscreti. +\end_layout + +\begin_layout Section +LVM2 +\end_layout + +\begin_layout BeginFrame +Logical Volume Mapper (LVM2) +\end_layout + +\begin_layout Standard +Mappa i blocchi fisici di uno o più partizioni fisiche (di tipo LVM, appunto) + in un unico spazio di blocchi di partizioni +\begin_inset Quotes fld +\end_inset + +virtuali +\begin_inset Quotes frd +\end_inset + +. + La traduzione fisico--virtuale avviene a livello del kernel. + Permette quindi di: +\end_layout + +\begin_layout Itemize +Ridimensionare le partizioni a sistema acceso (dipende anche dal FS) +\end_layout + +\begin_layout Itemize +Fondere più dischi (partizioni) fisici, creandone uno virtuale di dimensione + pari alla somma +\end_layout + +\begin_layout Itemize +Fare striping, ovvero distribuire i blocchi dei files su più dischi, aumentando + il throughput +\end_layout + +\begin_layout Itemize +Mirroring (snapshotting), indipendentemente dal FS sulle partizioni LVM2. +\end_layout + +\begin_layout Standard +BTRFS e ZFS offrono nativamente queste caratteristiche, in tal caso l'uso + di LVM diventa opzionale. +\end_layout + +\begin_layout Section +RAID +\end_layout + +\begin_layout BeginFrame +RAID +\end_layout + +\begin_layout Standard + +\emph on +Redundant Array of Independent Disks +\emph default +: distribuisce i dati su più dischi facendoli figurare come un unico disco + virtuale, in modo che il guasto di un dispositivo danneggi minimamente + il contenuto del disco virtuale. + Permette di realizzare uno storage persistente. + +\begin_inset Note Note +status collapsed + +\begin_layout Plain Layout +Unito all'hot swap (rimozione e aggiunta di dischi senza spegnere il sistema) +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +Esistono più configurazioni RAID, identificate da un numero (RAID-1, RAID-3, + RAID-5\SpecialChar \ldots{} +). + La distribuzione dei dati viene effettuata a livello di byte o blocco su + un numero (minimo) variabile di dischi, dipendente dalla configurazione + RAID. +\end_layout + +\begin_layout Block +\begin_inset ERT +status open + +\begin_layout Plain Layout + +{} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Block +I dischi devono essere della stessa dimensione -- altrimenti viene presa + a riferimento la dimensione del più piccolo e lo spazio in eccesso sugli + altri è ignorato: spreco. +\end_layout + +\begin_layout Part +Licenza +\end_layout + +\begin_layout BeginFrame +Licenza +\end_layout + +\begin_layout Standard +Questa opera è licenziata sotto i termini della Creative Commons, Attribuzione + -- Non commerciale -- Condividi allo stesso modo 3.0 Italia License. +\begin_inset Newline newline +\end_inset + + +\end_layout + +\begin_layout Standard +Per una copia della licenza, consultare +\begin_inset CommandInset href +LatexCommand href +target "http://creativecommons.org/licenses/by-nc-sa/3.0/it/" + +\end_inset + +. +\end_layout + +\begin_layout Standard +\begin_inset Float figure +wide false +sideways false +status open + +\begin_layout Plain Layout +\begin_inset Graphics + filename by-nc-sa.eu.svg + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout EndFrame + +\end_layout + +\end_body +\end_document diff --git a/Corsi GNU Linux Avanzati/FHS e Filesystem/filesystem.svg b/Corsi GNU Linux Avanzati/FHS e Filesystem/filesystem.svg new file mode 100644 index 0000000..dea68b0 --- /dev/null +++ b/Corsi GNU Linux Avanzati/FHS e Filesystem/filesystem.svg @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + /dev/sda1 + + + Lettera: n-simo dispositivo (~disco) + Numero: m-sima partizione sull'n-simo disco + /dev/sda + Senza numero finale, n-simo dispositivo + + + diff --git a/Corsi GNU Linux Avanzati/FHS e Filesystem/palimpsest.png b/Corsi GNU Linux Avanzati/FHS e Filesystem/palimpsest.png new file mode 100644 index 0000000..4522149 Binary files /dev/null and b/Corsi GNU Linux Avanzati/FHS e Filesystem/palimpsest.png differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei backup/Presentazione Backup.lyx b/Corsi GNU Linux Avanzati/Gestione dei backup/Presentazione Backup.lyx new file mode 100644 index 0000000..480f9d5 --- /dev/null +++ b/Corsi GNU Linux Avanzati/Gestione dei backup/Presentazione Backup.lyx @@ -0,0 +1,2089 @@ +#LyX 2.1 created this file. For more info see http://www.lyx.org/ +\lyxformat 474 +\begin_document +\begin_header +\textclass beamer +\begin_preamble +\usetheme{Madrid} +% \usecolortheme{crane} +% Decommentate se la volete GIALLA +% http://www.hartwork.org/beamer-theme-matrix/ per esempi di temi e colori + + +%ridefinisce il footer per evitare di includere \institute tra () accanto al nome +% http://tex.stackexchange.com/questions/35166/how-can-i-remove-the-institute-from-the-author-footline-on-beamer +\setbeamertemplate{footline} +{ + \leavevmode% + \hbox{% + \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}% + \usebeamerfont{author in head/foot}\insertshortauthor%~~\beamer@ifempty{\insertshortinstitute}{}{(\insertshortinstitute)} + \end{beamercolorbox}% + \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}% + \usebeamerfont{title in head/foot}\insertshorttitle + \end{beamercolorbox}% + \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}% + \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em} + \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} + \end{beamercolorbox}}% + \vskip0pt% +} + +% hide navigation symbols in the bottom-right corner +\usenavigationsymbolstemplate{} + +% set fonts for nicer pdf view +\IfFileExists{lmodern.sty}{\usepackage{lmodern}}{} + +\setbeamercovered{transparent} +% or whatever (possibly just delete it) + +\titlegraphic{\includegraphics[height=2cm]{poul-logo.pdf}} +% Ricordate che dovete sempre avere il logo in pdf nella cartella dove avete il documento +\end_preamble +\use_default_options false +\maintain_unincluded_children false +\language italian +\language_package default +\inputencoding auto +\fontencoding global +\font_roman times +\font_sans default +\font_typewriter default +\font_math auto +\font_default_family default +\use_non_tex_fonts false +\font_sc false +\font_osf false +\font_sf_scale 100 +\font_tt_scale 100 +\graphics default +\default_output_format default +\output_sync 0 +\bibtex_command default +\index_command default +\paperfontsize default +\spacing single +\use_hyperref false +\papersize default +\use_geometry true +\use_package amsmath 2 +\use_package amssymb 2 +\use_package cancel 1 +\use_package esint 0 +\use_package mathdots 1 +\use_package mathtools 1 +\use_package mhchem 1 +\use_package stackrel 1 +\use_package stmaryrd 1 +\use_package undertilde 1 +\cite_engine basic +\cite_engine_type default +\biblio_style plain +\use_bibtopic false +\use_indices false +\paperorientation portrait +\suppress_date false +\justification true +\use_refstyle 0 +\index Index +\shortcut idx +\color #008000 +\end_index +\secnumdepth 2 +\tocdepth 2 +\paragraph_separation indent +\paragraph_indentation default +\quotes_language english +\papercolumns 1 +\papersides 1 +\paperpagestyle default +\tracking_changes false +\output_changes false +\html_math_output 0 +\html_css_as_file 0 +\html_be_strict false +\end_header + +\begin_body + +\begin_layout Standard +\begin_inset Note Note +status open + +\begin_layout Plain Layout +Andate in Documento -> Impostazioni -> Preambolo di LaTeX per dare un occhio + ad alcune opzioni +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Section* +Title screen +\end_layout + +\begin_layout Title +Backup +\begin_inset Argument 1 +status open + +\begin_layout Plain Layout +\begin_inset Note Note +status open + +\begin_layout Plain Layout +opzionale, è quello che viene scritto in basso al centro +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Subtitle +Cosa, Come,Quando e Perchè effettuare il Backup di sistema +\end_layout + +\begin_layout Author +Andrea Grazioso +\begin_inset Newline newline +\end_inset + + +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +href{mailto:grazioandre@gmail.com}{ +\backslash +nolinkurl{grazioandre@gmail.com}} +\end_layout + +\end_inset + + +\begin_inset Argument 1 +status open + +\begin_layout Plain Layout +Andrea Grazioso +\end_layout + +\end_inset + + +\begin_inset Note Note +status open + +\begin_layout Plain Layout +Lo so è un pò brutto, ma non ho trovato di meglio per far vedere autore + e mail con link mailto funzionante nella prima pagina. +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Date +Corsi Gnu/Linux Avanzati 2013/2014 +\begin_inset Argument 1 +status collapsed + +\begin_layout Plain Layout +Corsi Linux Avanzati +\begin_inset Note Note +status collapsed + +\begin_layout Plain Layout +opzionale, è quello che viene scritto in basso a destra +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Note Note +status open + +\begin_layout Plain Layout +If you wish to uncover everything in a step-wise fashion, uncomment the + following command: +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +beamerdefaultoverlayspecification{<+->} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Note Note +status open + +\begin_layout Plain Layout +Structuring a talk is a difficult task and the following structure may not + be suitable. + Here are some rules that apply for this solution: +\end_layout + +\begin_layout Itemize +Exactly two or three sections (other than the summary). + +\end_layout + +\begin_layout Itemize +At *most* three subsections per section. + +\end_layout + +\begin_layout Itemize +Talk about 30s to 2min per frame. + So there should be between about 15 and 30 frames, all told. +\end_layout + +\begin_layout Itemize +A conference audience is likely to know very little of what you are going + to talk about. + So *simplify*! +\end_layout + +\begin_layout Itemize +In a 20min talk, getting the main ideas across is hard enough. + Leave out details, even if it means being less precise than you think necessary. + +\end_layout + +\begin_layout Itemize +If you omit details that are vital to the proof/implementation, just say + so once. + Everybody will be happy with that. + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Section +Cos'è un backup? +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Cos'è il backup? +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Quotation +There are two kinds of people: those who do regular backups and those who + never had a hard drive failure — Unknown. +\end_layout + +\begin_layout Pause + +\end_layout + +\begin_layout Standard +Con il termine +\begin_inset Quotes fld +\end_inset + +backup +\begin_inset Quotes frd +\end_inset + + si intende replicazione su supporti di memorizzazione di materiale informativo + archiviato nella memoria di massa del PC al fine di prevenire perdite di + dati a seguito di eventi malevoli o accidentali. +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Cosa minaccia i nostri dati? +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Standard +\align center +\begin_inset Graphics + filename Talk Backup media/chart.png + width 100page% + height 100page% + +\end_inset + + +\end_layout + +\end_deeper +\begin_layout Section +Dove salvare il backup +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Supporti: CD, DVD e Blu-ray +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Standard +Eredi dei floppy disk questi supporti ottici sono diventati i principali + supporti per la vendita in campo audio, video, videoludico, software. +\end_layout + +\begin_layout Standard +Si presentano in vari formati ognuno con caratteristiche diverse a seconda + del campo di applicazione per cui sono stati progettati +\end_layout + +\begin_layout ExampleBlock +\begin_inset Argument 2 +status open + +\begin_layout Plain Layout +Pro +\end_layout + +\end_inset + + +\end_layout + +\begin_layout ExampleBlock +Ottimali per il backup di dati +\end_layout + +\begin_layout ExampleBlock +Disponibili in vari formati (CD, DVD Blu-ray) +\end_layout + +\begin_layout ExampleBlock +Portatili +\end_layout + +\begin_layout ExampleBlock +Resistenti ai danni superficiali, come al magnetismo e all'azione dell'acqua +\end_layout + +\begin_layout ExampleBlock +Disponibili riscrivibili e non +\end_layout + +\begin_layout ExampleBlock +Elevata longevità +\end_layout + +\begin_layout AlertBlock +\begin_inset Argument 2 +status open + +\begin_layout Plain Layout +Contro +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +Necessitano di un drive apposito per essere utilizzati +\end_layout + +\begin_layout AlertBlock +Urti e scossoni durante la scrittura potrebbero rendere il drive illegibile +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Optical Media Comparison +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Standard +\align center +\begin_inset Graphics + filename Talk Backup media/cd-dvd-bluray-logo.gif + scale 30 + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Tabular + + + + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Dim Max +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Lifetime +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Min Write Speed +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Max Write Speed +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +CD +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +700MB +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +10 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +1x=150Kib/s +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +56x=8400KiB/s +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +DVD +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +4.7GB +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +30 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +1x=1.32Mib/s +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +24x=32.46MiB/s +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +Blu-ray +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +200GB +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +50 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +1x=4.29Mib/s +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +16x=68.66MiB/s +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Block +\begin_inset Argument 2 +status open + +\begin_layout Plain Layout +Nota Bene +\end_layout + +\end_inset + + +\begin_inset Formula $1MiB=1,024MB$ +\end_inset + + +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Supporti: Flash Drive +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Standard +Dalle dimensioni ridotte e discreta capacità questi supporti hanno decisamente + spopolato nel corso degli ultimi anni grazie alla diffusione dello standard + USB; composti esclusivamente da materiale elettronico, è un peccato che + siano scarsamente affidabili, ciò non le rende consigliate per il backup + di dati. + +\end_layout + +\begin_layout ExampleBlock +\begin_inset Argument 2 +status open + +\begin_layout Plain Layout +Pro +\end_layout + +\end_inset + + +\end_layout + +\begin_layout ExampleBlock +Non necessitano di driver per l'uso +\end_layout + +\begin_layout ExampleBlock +Buona velocità di trasferimento +\end_layout + +\begin_layout ExampleBlock +Estrema versatilità e portabilità +\end_layout + +\begin_layout ExampleBlock +Resistenti agli urti +\end_layout + +\begin_layout ExampleBlock +Buona longevità di circa 100'000 cicli di scrittura +\end_layout + +\begin_layout AlertBlock +\begin_inset Argument 2 +status open + +\begin_layout Plain Layout +Contro +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +Costo per GB piùttosto elevato +\end_layout + +\begin_layout AlertBlock +Facili da perdere +\end_layout + +\begin_layout AlertBlock +Scarsamente affidabili +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Supporti: Hard Disk +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Standard +Costituiti internamente da dischi magnetici in rapida rotazione attorno + ad un asse comune, letti da una testina messa in moto da un attuatore questi + sistemi sono diventati i principali supporti di memorizzazione di massa + in PC, laptop, server e console. + Ad oggi il costo di un GB negli hard disk è molto basso, circa $0.05/GB + e la loro durata è influenzata dal tipo di utilizzo che ne è stato fatto. +\end_layout + +\begin_layout ExampleBlock +\begin_inset Argument 2 +status open + +\begin_layout Plain Layout +Pro +\end_layout + +\end_inset + + +\end_layout + +\begin_layout ExampleBlock +Elevatissima capacità +\end_layout + +\begin_layout ExampleBlock +Buona velocità di trasmissione +\end_layout + +\begin_layout ExampleBlock +Non necessitano di driver esterni per l'uso +\end_layout + +\begin_layout ExampleBlock +Compatibili con molte interfacce (PATA, SATA, USB, Firewire, eSATA) +\end_layout + +\begin_layout AlertBlock +\begin_inset Argument 2 +status open + +\begin_layout Plain Layout +Contro +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +Necessitano di rimanere il più possibile fermi durante l'uso +\end_layout + +\begin_layout AlertBlock +Per essere utilizzati al meglio occorre avere conoscenze sulla gestione + di dischi e di filesystem +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Supporti: Solid State Drive +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Standard +Gli SSD sono gli ultimi tipi di memorie ad essere approdate sul mercato + consumer. + Composti da circuiti integrati che fungono da memoria per l'archiviazione + dei dati in questi dispositivi non c'è nessuna parte in movimento, ciò, + unito alle capacità dell'interfaccia SATA li rende estremamente performanti. + Purtroppo sono anche maggiormente soggetti a guasti rispetto agli HDD, + perciò questi ultimi sono ancora da preferire nel caso si voglia archiviare + dati a lungo termine. +\end_layout + +\begin_layout ExampleBlock +\begin_inset Argument 2 +status open + +\begin_layout Plain Layout +Pro +\end_layout + +\end_inset + + +\end_layout + +\begin_layout ExampleBlock +Grande capienza +\end_layout + +\begin_layout ExampleBlock +Elevatissima velocità di trasferimento +\end_layout + +\begin_layout ExampleBlock +Resistenti ad urti e movimenti durante l'uso +\end_layout + +\begin_layout ExampleBlock +Molto leggeri e silenziosi, adatti all'uso laptop +\end_layout + +\begin_layout AlertBlock +\begin_inset Argument 2 +status open + +\begin_layout Plain Layout +Contro +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +Costo elevato +\end_layout + +\begin_layout AlertBlock +Bassa aspettativa di vita +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Supporti Online: Cloud e Data Storage +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Standard +In alternativa a device fisici di cui occuparsi personalmente si può optare + per affidarsi a servizi di archiviazione/backup online che si caratterizzano + per funzionalità aggiuntive come ridondanza dei dati in luoghi multipli, + protezione dei dati mediante RAID dei dischi, crittografia, banda illimitata + in upload, ed un servizio generalmente scalabile. + +\end_layout + +\begin_layout Itemize +Amazon Glacier +\end_layout + +\begin_layout Itemize +OVH cloud storage +\end_layout + +\begin_layout Itemize +Backblaze +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Supporti: Considerazioni Finali +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Standard +Alla luce di quanto visto, quale supporto scegliere per il backup dei propri + dati? +\end_layout + +\begin_layout Pause + +\end_layout + +\begin_layout Standard +La risposta non è così banale... +\end_layout + +\end_deeper +\begin_layout Section +Come strutturare un backup +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Snapshot di sistema +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Standard +E' il cosidetto Snapshot che salva lo stato esatto del sistema in un particolare + istante di tempo. +\end_layout + +\begin_layout Standard +Lo scopo di questa tecnica è copiare bit per bit tutte le informazioni contenute + nel disco sorgente ricostruendo così l'esatta struttura del sistema +\end_layout + +\begin_layout Itemize +dd +\end_layout + +\begin_layout Itemize +rsnapshot +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Backup di file +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Standard +Da semplice copia di file a backup strutturato, questo metodo è ottimo per + gli utenti del sistema che vogliono salvare esclusivamente la propria home + come per gli amministratori che vogliono un backup compatto dell'intero + sistema. +\end_layout + +\begin_layout Itemize +tar +\end_layout + +\begin_layout Itemize +rsync +\end_layout + +\begin_layout Itemize +duplicity +\end_layout + +\begin_layout Standard +Possibili aperture a tecniche avanzate +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Metodi Avanzati +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Standard +Complementari ai metodi appena visti vi sono tre tecniche avanzate che è + indispensabile conoscere +\end_layout + +\begin_layout Description +Incrementale, aggiunge all'ultimo backup, il materiale ha subito dei cambiamenti + dall'ultimo backup o incremento. + Più sicuro di quello differenziale ma necessità di attenzione nel ripristino +\end_layout + +\begin_layout Description +Differenziale, modifica di volta in volta il backup precedente con i file + che hanno subito dei cambiamenti. + Più veloce dell'incrementale e meno ingombrante, ma mantiene solo l'ultima + versione dei file. +\end_layout + +\end_deeper +\begin_layout Section +Programmi di backup +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Ultime raccomandazioni +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Standard +Cose che dovreste sapere su +\end_layout + +\begin_layout Itemize +/tmp +\end_layout + +\begin_layout Itemize +/proc /sys +\end_layout + +\begin_layout Itemize +/etc /var +\end_layout + +\begin_layout Itemize +/dev /mnt /media +\end_layout + +\begin_layout Standard +Alte raccomandazioni +\end_layout + +\begin_layout Itemize +Attenzione ai vostri file +\end_layout + +\begin_layout Itemize +Ridurre gli sprechi +\end_layout + +\begin_layout Itemize +Live media +\end_layout + +\begin_layout Itemize +Cron +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +dd +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Standard +dd è un utility di copia e conversione dati. + Se non altrimenti specificato dd si limita a copiare dati da una sorgente + alla destinazione. +\end_layout + +\begin_layout LyX-Code +dd if=/dev/sdx of=/dev/sdy +\end_layout + +\begin_layout Description +if - input file, cioè la sorgente +\end_layout + +\begin_layout Description +of - output file, cioè la destinazione +\end_layout + +\begin_layout Standard +quando si usa dd è importante assicurarsi che si opera sulle giuste partizioni/f +ile poichè questo comando è potenzialmente distruttivo. +\end_layout + +\begin_layout Block +\begin_inset Argument 2 +status open + +\begin_layout Plain Layout +nota +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Block +Per controllare che le partizioni siano quelle corrette ci si può servire + di tools come fdisk o gparted. +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Tar +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Standard +\begin_inset Graphics + filename Talk Backup media/tar.svg + scale 50 + +\end_inset + + +\end_layout + +\begin_layout Standard +Inizialmente sviluppato per scrivere dati sequenzialmente (per effettuare + backup sui nastri magnetici), tar è ora un utility per riunire in un unico + blocco tanti file per distribuzione/archiviazione, preservanso allo stesso + tempo informazioni sui permessi e sulla struttura delle cartelle. +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Tar: funzionamento +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Standard +\begin_inset Graphics + filename Talk Backup media/Targzip.svg + scale 15 + +\end_inset + + +\end_layout + +\begin_layout ExampleBlock +\begin_inset Argument 2 +status open + +\begin_layout Plain Layout +pro +\end_layout + +\end_inset + + +\end_layout + +\begin_layout ExampleBlock +Permette di salvare i file in un unico blocco... +\end_layout + +\begin_layout ExampleBlock +...ed eventualmente comprimerlo +\end_layout + +\begin_layout ExampleBlock +Rispetta la struttura delle directory +\end_layout + +\begin_layout ExampleBlock +Salva i permessi dei file +\end_layout + +\begin_layout AlertBlock +\begin_inset Argument 2 +status open + +\begin_layout Plain Layout +contro +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +Non conserva informazioni sul filesystem di partenza +\end_layout + +\begin_layout AlertBlock +Non segue i symlink (Attenzione a /proc e simili) +\end_layout + +\begin_layout AlertBlock +Utilizzare algoritmi di compressione può richiedere molta potenza di calcolo +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Tar Usage +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout LyX-Code +tar -cvpzf /media/BackupStorage/backup01-03-14.tar.gz +\end_layout + +\begin_deeper +\begin_layout LyX-Code +--exclude=/media / +\end_layout + +\end_deeper +\begin_layout Description +c - crea un nuovo archivio. +\end_layout + +\begin_layout Description +v - verbose mode. +\end_layout + +\begin_layout Description +p - preserva i permessi dei file. +\end_layout + +\begin_layout Description +z - comprime i file usando l'algoritmo di gzip. +\end_layout + +\begin_layout Description +f - Specifica il path assoluto nel quale salvare il file. +\end_layout + +\begin_layout Description +/media/BackupStorage/backup01-03-14.tar.gz - Specifica il path in cui salvare + il backup. +\end_layout + +\begin_layout Description +--exclude=/path - Seleziona i percorsi da escludere. +\end_layout + +\begin_layout Description +/ - directory di partenza per il backup, che include tutte le relative sottocart +elle. +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Rsync +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Standard +Rsync è un comando che permette la copia di file su una destinazione fisica + eventualmente tentando di copiare solo le differenze. + Noto anche per essere la versione avanzata di cp +\end_layout + +\begin_layout LyX-Code +rsync -Pr source destination +\end_layout + +\begin_layout Description +P - indica a rsync di mantenere i file parzialmente trasferiti e di mostrare + la barra dell'avanzamento durante il processo di trasferimento +\end_layout + +\begin_layout Description +r - opzione per la ricorsività nelle cartelle +\end_layout + +\begin_layout Standard +Altre opzioni comuni di utilizzo per rsync: +\end_layout + +\begin_layout LyX-Code +rsync -aAXv /* /backup_folder --exclude={...} +\end_layout + +\begin_layout LyX-Code +rsync -avz -e ssh +\end_layout + +\begin_deeper +\begin_layout LyX-Code +remoteuser@remotehost:/remote/dir /this/dir/ +\end_layout + +\end_deeper +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Utilizzo di ssh +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout LyX-Code +dd if=/dev/sda | ssh username@servername.net +\end_layout + +\begin_deeper +\begin_layout LyX-Code +"dd of=/file" +\end_layout + +\end_deeper +\begin_layout LyX-Code +tar -cvpz <...> / | ssh user@backuphost +\end_layout + +\begin_deeper +\begin_layout LyX-Code +"( cat > ssh_backup01-03-14.tar.gz )" +\end_layout + +\end_deeper +\begin_layout Description +| - pipe, indica che l'output del comando a sinistra verrà reindirizzato + al seguente +\end_layout + +\begin_layout Description +ssh - Secure Shell, tramite il quale ci si collega a +\begin_inset Quotes eld +\end_inset + +backuphost +\begin_inset Quotes erd +\end_inset + + come +\begin_inset Quotes eld +\end_inset + +user +\begin_inset Quotes erd +\end_inset + + +\end_layout + +\begin_layout Description +cat - utility di concatenamento di file +\end_layout + +\begin_layout Description +> - reindirizzamento dell'output +\end_layout + +\begin_layout Description +ssh-backup01-03-14.tar.gz - destinazione +\end_layout + +\begin_layout Block +\begin_inset Argument 2 +status open + +\begin_layout Plain Layout +Nota +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Block +Ricordati di settare chiavi ssh e permessi sia su localhost che su remote + host! +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +rdiff-backup +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout LyX-Code +rdiff-backup dir1 user@system::/dir2 +\end_layout + +\begin_layout LyX-Code + rdiff-backup dir1 dir2 +\end_layout + +\begin_layout Standard +rdiff-backup è un utility in circolazione ormai da molto tempo che permette + il backup in locale o anche in remoto utilizzando il metodo incrementale. +\end_layout + +\begin_layout ExampleBlock +\begin_inset Argument 2 +status open + +\begin_layout Plain Layout +Pro +\end_layout + +\end_inset + + +\end_layout + +\begin_layout ExampleBlock +preserva la struttura delle cartelle, links, permessi, attributi estesi, + metadati. +\end_layout + +\begin_layout ExampleBlock +ottimizzato per la rete +\end_layout + +\begin_layout ExampleBlock +facile da utilizzare +\end_layout + +\begin_layout ExampleBlock +permette backup incrementale +\end_layout + +\begin_layout ExampleBlock +mantiene dei log +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Duplicity +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Standard +In merito all' +\begin_inset Quotes fld +\end_inset + +eccessiva semplicità +\begin_inset Quotes frd +\end_inset + + di rsync sono nati dubbi e perplessità nel momento in cui si è cominciato + ad archiviare sui propri PC dati sensibili, ed ecco quindi nascere duplicity, + che integra perfettamente tutte le funzionalità di rsync aggiungendo opzioni + per la sicurezza e la crittografia. +\end_layout + +\begin_layout ExampleBlock +\begin_inset Argument 2 +status open + +\begin_layout Plain Layout +Pro +\end_layout + +\end_inset + + +\end_layout + +\begin_layout ExampleBlock +Molto semplice da utilizzare +\end_layout + +\begin_layout ExampleBlock +Permette il backup incrementale +\end_layout + +\begin_layout ExampleBlock +Ottimizzato per il backup +\end_layout + +\begin_layout ExampleBlock +Permette di cifrare i dati salvati +\end_layout + +\begin_layout AlertBlock +\begin_inset Argument 2 +status open + +\begin_layout Plain Layout +Contro +\end_layout + +\end_inset + + +\end_layout + +\begin_layout AlertBlock +Pensato per il backup di singole macchine +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Duplicity Usage +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout LyX-Code +duplicity /home/me sftp://uid@other.host//some_dir +\end_layout + +\begin_layout Description +/home/me - percorso da includere nel backup con tutte le relative sottocartelle +\end_layout + +\begin_layout Description +sftp://uid@other.host//some_dir - destinazione sottoforma di indirizzo sftp, + nello specifico ci si collega ad +\begin_inset Quotes eld +\end_inset + +other.host +\begin_inset Quotes erd +\end_inset + + come user +\begin_inset Quotes eld +\end_inset + +uid +\begin_inset Quotes erd +\end_inset + +, e il backup avrà posto in +\begin_inset Quotes eld +\end_inset + +some_dir +\begin_inset Quotes erd +\end_inset + + +\end_layout + +\begin_layout LyX-Code +duplicity restore sftp://uid@other.host//dir /home/me +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Duplicity Usage Extended +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout LyX-Code +duplicity -t 3D restore +\end_layout + +\begin_deeper +\begin_layout LyX-Code +sftp://uid@other.host//come_dir /home/me +\end_layout + +\end_deeper +\begin_layout LyX-Code + +\end_layout + +\begin_layout Description +xD - specifica la necessità di recuperare dei dati di x giorni prima che, + ad esempio, sono stati cancellati per errore e poi è stato lanciato il + comando di duplicity per avviare il backup +\end_layout + +\begin_layout Standard +Infine è possibile eliminare dati che oramai non servono più se avessimo + bisogno di spazio per nuovi backup: +\end_layout + +\begin_layout LyX-Code +duplicity remove-older-than 30D +\end_layout + +\begin_deeper +\begin_layout LyX-Code +sftp://uid@other.host//some_dir +\end_layout + +\end_deeper +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Bacula e Amanda +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Standard +\align center +\begin_inset Graphics + filename Talk Backup media/img7.svg + width 70page% + height 100pheight% + +\end_inset + + +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Riferimenti +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Itemize +Backup Handbook +\end_layout + +\begin_layout Itemize +\begin_inset CommandInset href +LatexCommand href +name "http://en.wikipedia.org/" +target "http://en.wikipedia.org/" + +\end_inset + + +\end_layout + +\begin_layout Itemize +\begin_inset CommandInset href +LatexCommand href +name "https://help.ubuntu.com/community/BackupYourSystem/TAR" +target "https://help.ubuntu.com/community/BackupYourSystem/TAR" + +\end_inset + + +\end_layout + +\begin_layout Itemize +\begin_inset CommandInset href +LatexCommand href +name "https://wiki.archlinux.org/index.php/" +target "https://wiki.archlinux.org/index.php/" + +\end_inset + + +\end_layout + +\begin_layout Itemize +\begin_inset CommandInset href +LatexCommand href +name "http://www.tomshardware.com/reviews/usb-3-uas-turbo,3215-2.html" +target "http://www.tomshardware.com/reviews/usb-3-uas-turbo,3215-2.html" + +\end_inset + + +\end_layout + +\begin_layout Itemize +\begin_inset CommandInset href +LatexCommand href +name "http://data-backup-software-review.toptenreviews.com/removable-backup-media.html" +target "http://data-backup-software-review.toptenreviews.com/removable-backup-media.html" + +\end_inset + + +\end_layout + +\begin_layout Itemize +\begin_inset CommandInset href +LatexCommand href +name "http://www.nongnu.org/rdiff-backup" +target "http://www.nongnu.org/rdiff-backup" + +\end_inset + + +\end_layout + +\begin_layout Itemize +Giornalinux 2.0 N14 - +\begin_inset CommandInset href +LatexCommand href +name "www.poul.org" +target "www.poul.org" + +\end_inset + + +\end_layout + +\begin_layout Itemize +\begin_inset CommandInset href +LatexCommand href +name "http://www.bacula.org/en/" +target "http://www.bacula.org/en/" + +\end_inset + + +\end_layout + +\begin_layout Itemize +\begin_inset CommandInset href +LatexCommand href +name "http://amanda.org/" +target "http://amanda.org/" + +\end_inset + + +\end_layout + +\begin_layout Itemize +\begin_inset CommandInset href +LatexCommand href +name "http://aws.amazon.com" +target "http://aws.amazon.com" + +\end_inset + + +\end_layout + +\begin_layout Itemize +Unix and Linux system administration handbook, fourth edition, Evi Nemeth, + Garth Snyder, Trent R. + Hein, Ben Whaley +\end_layout + +\end_deeper +\begin_layout Separator + +\end_layout + +\begin_layout Frame +\begin_inset Argument 4 +status open + +\begin_layout Plain Layout +Grazie per l'attenzione! +\end_layout + +\end_inset + + +\end_layout + +\begin_deeper +\begin_layout Standard +\align center + +\size largest +\lang english +Grazie per l'attenzione! +\size default + +\begin_inset Graphics + filename /home/r4yan2/Documents/POuL/Template Slide POuL/by-sa.svg + height 0.9cm + +\end_inset + + +\begin_inset Newline newline +\end_inset + + +\size footnotesize +Queste slides sono licenziate Creative Commons Attribution-ShareAlike 4.0 +\end_layout + +\begin_layout Standard +\align center + +\family typewriter +\lang english +\begin_inset Flex URL +status open + +\begin_layout Plain Layout + +http://www.poul.org +\end_layout + +\end_inset + + +\end_layout + +\end_deeper +\end_body +\end_document diff --git a/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/Backup-data-loss-causes.jpg b/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/Backup-data-loss-causes.jpg new file mode 100644 index 0000000..fc63080 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/Backup-data-loss-causes.jpg differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/Targzip.svg b/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/Targzip.svg new file mode 100644 index 0000000..ffbf004 --- /dev/null +++ b/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/Targzip.svg @@ -0,0 +1,71 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/cc-by-sa.png b/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/cc-by-sa.png new file mode 100644 index 0000000..ef8a335 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/cc-by-sa.png differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/cd-dvd-bluray-logo.gif b/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/cd-dvd-bluray-logo.gif new file mode 100644 index 0000000..330065b Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/cd-dvd-bluray-logo.gif differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/data_loss.gif b/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/data_loss.gif new file mode 100644 index 0000000..f767269 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/data_loss.gif differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/img7.svg b/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/img7.svg new file mode 100644 index 0000000..a00c308 --- /dev/null +++ b/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/img7.svg @@ -0,0 +1,1335 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/infographic-data.svg b/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/infographic-data.svg new file mode 100644 index 0000000..cd4ba62 --- /dev/null +++ b/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/infographic-data.svg @@ -0,0 +1,136 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/tar.svg b/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/tar.svg new file mode 100644 index 0000000..76d1466 --- /dev/null +++ b/Corsi GNU Linux Avanzati/Gestione dei backup/Talk Backup media/tar.svg @@ -0,0 +1,106 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + diff --git a/Corsi GNU Linux Avanzati/Gestione dei backup/poul-logo.pdf b/Corsi GNU Linux Avanzati/Gestione dei backup/poul-logo.pdf new file mode 100644 index 0000000..995ce06 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei backup/poul-logo.pdf differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/beamerthemeNecst.sty b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/beamerthemeNecst.sty new file mode 100644 index 0000000..d8c45e1 --- /dev/null +++ b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/beamerthemeNecst.sty @@ -0,0 +1,116 @@ +\mode + +\usepackage[italian]{babel} +\usepackage[utf8x]{inputenc} +\usepackage[T1]{fontenc} + +%Algorithm package +\usepackage{algorithm} +\usepackage{algorithmicx} +\usepackage{algpseudocode} + +\usepackage{color, colortbl} + +%\definecolor{necstgreen}{rgb}{0.137,0.466,0.741} +%\definecolor{necstgreen}{RGB}{240,40,40} + +%\definecolor{necstgreen}{RGB}{187,216,113} +\definecolor{necstgreen}{RGB}{171,216,80} +\definecolor{necstgreen2}{RGB}{0,158, 96} +\definecolor{necstgray}{RGB}{30,30,30} + +\usetheme{Madrid} +\useoutertheme[subsection=false]{miniframes} +%\useinnertheme{rectangles} +\usecolortheme[named=necstgreen]{structure} +\setbeamercolor*{palette primary}{use=structure,fg=necstgray,bg=necstgreen} +%\setbeamertemplate{items}[ball,bg=necstgreen] +%\setbeamertemplate{blocks}[rectangles][shadow=false] +%\setbeamercolor{block title}{use=structure,fg=necstgray} +\setbeamertemplate{items}[circle] +\setbeamercolor*{item}{use=structure,fg=necstgreen} + +\defbeamertemplate*{title page}{customized}[1][] +{ + \vbox{} + \vfill + \begin{centering} + \begin{beamercolorbox}[sep=8pt,center,rounded=true,shadow=true]{title} + \usebeamerfont{title}\inserttitle\par% + \ifx\insertsubtitle\@empty% + \else% + \vskip0.25em% + {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}% + \fi% + \end{beamercolorbox}% + \vskip1em + \vfill + \par + \begin{beamercolorbox}[sep=8pt,center,#1]{author} + \usebeamerfont{author} \insertauthor + \end{beamercolorbox} + \begin{beamercolorbox}[sep=8pt,center,#1]{institute} + \usebeamerfont{institute}\insertinstitute + \end{beamercolorbox} + \begin{beamercolorbox}[sep=8pt,center,#1]{date} + \usebeamerfont{date}\insertdate + \end{beamercolorbox}\vskip0.5em + {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par} + \end{centering} +} + +\RequirePackage{ifthen} % package required + +\newboolean{sectionimg} +\setboolean{sectionimg}{false} % default to false + +\AtBeginSection[]{ +\begin{frame} + \begin{center} + \begin{beamercolorbox}[sep=8pt,center,rounded=true,shadow=true]{part title} + \usebeamerfont{part title}\insertsection + \end{beamercolorbox} + \end{center} + \ifthenelse{\boolean{sectionimg}}{ + \begin{center} + \includegraphics[scale=0.15]{./img/jackdaw.png} + \end{center} + } + +\end{frame} +} +\newcommand{\imagesection}[2]{ + \setboolean{sectionimg}{true} + \section[#1]{#2} + \setboolean{sectionimg}{false} +} + + +\setbeamercolor{section in head/foot}{fg=white, bg=necstgray} +\setbeamercolor{author in head/foot}{fg=necstgray, bg=necstgreen} +\setbeamercolor{logo in head/foot}{fg=white, bg=necstgray} +\setbeamercolor{page number in head/foot}{fg=necstgray, bg=necstgreen} + +%Color itemize/description ... +\setbeamercolor{description item}{fg=necstgreen2} + +\setbeamertemplate{footline} +{ + \leavevmode% + \hbox{% + \begin{beamercolorbox}[wd=.10\paperwidth,ht=2.25ex,dp=1ex,center]{logo in head/foot}% + \usebeamerfont{logo in head/foot}POuL + \end{beamercolorbox}% + \begin{beamercolorbox}[wd=.20\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}% + \usebeamerfont{author in head/foot}\insertshortauthor + \end{beamercolorbox}% + \begin{beamercolorbox}[wd=.65\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}% + \usebeamerfont{title in head/foot}\insertshorttitle + \end{beamercolorbox}}% + \begin{beamercolorbox}[wd=.05\paperwidth,ht=2.25ex,dp=1ex,center]{page number in head/foot}% + \usebeamerfont{page number in head/foot}\insertframenumber + \end{beamercolorbox}% + \vskip0pt% +} + +\setbeamertemplate{navigation symbols}{} \ No newline at end of file diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LUKS/luks-logo.png b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LUKS/luks-logo.png new file mode 100644 index 0000000..5662549 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LUKS/luks-logo.png differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LUKS/security.png b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LUKS/security.png new file mode 100644 index 0000000..d05d29d Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LUKS/security.png differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/Lvm.pdf b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/Lvm.pdf new file mode 100644 index 0000000..ed19f11 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/Lvm.pdf differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/Lvm.svg b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/Lvm.svg new file mode 100644 index 0000000..1cc186c --- /dev/null +++ b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/Lvm.svg @@ -0,0 +1,226 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + PVhdisk1 + + + + + + PP32 MB + + + + PP32 MB + + + + PP32 MB + + + + + + PP32 MB + + + + PP32 MB + + + + PP32 MB + + + + + + PP32 MB + + + + PP32 MB + + + + PP32 MB + + + + + + + + PVhdisk2 + + + + + + PP32 MB + + + + PP32 MB + + + + PP32 MB + + + + + + PP32 MB + + + + PP32 MB + + + + PP32 MB + + + + + + PP32 MB + + + + PP32 MB + + + + PP32 MB + + + + + + + + PVhdisk3 + + + + + + PP32 MB + + + + PP32 MB + + + + PP32 MB + + + + + + PP32 MB + + + + PP32 MB + + + + PP32 MB + + + + + + PP32 MB + + + + PP32 MB + + + + PP32 MB + + + + + + VGmyvg + + + + LV/dev/hlv + + + + + LV/dev/data + + + + + LV/dev/srvlv + + + + + FSjfs + + + + FSext3 + + + + FSjfs2 + + + + MP/home/ + + + + MP/var/www + + + + MP/data/ + + + ls /var/wwwexample.orgfoo.orglocalhost + ls /datanotizen.txtstartsrv.shfoo.bar + ls /homeuser01user02user03 + + + PP: Physical Partition PV: Physical VolumeVG: Volume GroupLV: Logical VolumeFS: FilesystemMP: Mounting Point + + LVM + Logical Volume Manager + + + \ No newline at end of file diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/extent-map.png b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/extent-map.png new file mode 100644 index 0000000..c085fc8 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/extent-map.png differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/lvg.png b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/lvg.png new file mode 100644 index 0000000..e912f29 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/lvg.png differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/lvm1.png b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/lvm1.png new file mode 100644 index 0000000..4ea81f7 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/lvm1.png differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/mirrored.png b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/mirrored.png new file mode 100644 index 0000000..8846cc8 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/mirrored.png differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/mirrored_vol.png b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/mirrored_vol.png new file mode 100644 index 0000000..84c20f0 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/mirrored_vol.png differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/physical disk contents in LVM.png b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/physical disk contents in LVM.png new file mode 100644 index 0000000..48f9af4 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/physical disk contents in LVM.png differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/stripedvol.png b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/stripedvol.png new file mode 100644 index 0000000..feda613 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/stripedvol.png differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/stripped.png b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/stripped.png new file mode 100644 index 0000000..d537adc Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/LVM/stripped.png differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/necst-official-logo-white.pdf b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/necst-official-logo-white.pdf new file mode 100644 index 0000000..8c95ef3 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/necst-official-logo-white.pdf differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/poul-logo.svg b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/poul-logo.svg new file mode 100644 index 0000000..3d5a51a --- /dev/null +++ b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/poul-logo.svg @@ -0,0 +1,232 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/poul.pdf b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/poul.pdf new file mode 100644 index 0000000..995ce06 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/poul.pdf differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/244-344-thickbox.jpg b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/244-344-thickbox.jpg new file mode 100644 index 0000000..77303e5 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/244-344-thickbox.jpg differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID0.svg b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID0.svg new file mode 100644 index 0000000..0630017 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID0.svg differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_0.pdf b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_0.pdf new file mode 100644 index 0000000..46e414d Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_0.pdf differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_0.svg b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_0.svg new file mode 100644 index 0000000..c9a8244 --- /dev/null +++ b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_0.svg @@ -0,0 +1,56 @@ + + + + + + + + + image/svg+xml + + + + + + + + + A7 + + + + A5 + + + + A3 + + + + A1 + + + + + + A8 + + + + A6 + + + + A4 + + + + A2 + + + + RAID 0 + Disk 0 + Disk 1 + + \ No newline at end of file diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_01.pdf b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_01.pdf new file mode 100644 index 0000000..9ec1bd4 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_01.pdf differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_1.pdf b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_1.pdf new file mode 100644 index 0000000..d906f06 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_1.pdf differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_1.svg b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_1.svg new file mode 100644 index 0000000..91436bf --- /dev/null +++ b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_1.svg @@ -0,0 +1,56 @@ + + + + + + + + + image/svg+xml + + + + + + + + + A4 + + + + A3 + + + + A2 + + + + A1 + + + + + + A4 + + + + A3 + + + + A2 + + + + A1 + + + + RAID 1 + Disk 0 + Disk 1 + + \ No newline at end of file diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_10.pdf b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_10.pdf new file mode 100644 index 0000000..464fcd4 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_10.pdf differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_2.pdf b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_2.pdf new file mode 100644 index 0000000..57e9d21 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_2.pdf differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_2.svg b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_2.svg new file mode 100644 index 0000000..5b5a7ad --- /dev/null +++ b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_2.svg @@ -0,0 +1,145 @@ + + + + + + + + + + + image/svg+xml + + + + + + + RAID 2 + + + + D1 + + + C1 + + + + B1 + + + + A1 + + + Disk 0 + + + + + D2 + + + C2 + + + + B2 + + + A2 + + Disk 1 + + + + + D3 + + + C3 + + + + B3 + + + + A3 + + + Disk 2 + + + + + D4 + + C4 + + + B4 + + + + A4 + + + Disk 3 + + + + + + + + + + + Ap1 + Bp1 + + + Disk 4 + Cp1 + Dp1 + + + + + + + + + Ap2 + + + Disk 5 + Bp2 + Cp2 + Dp2 + + + + + + + + + Ap3 + Bp3 + Cp3 + Disk 6 + Dp3 + + + + + + + + + + + \ No newline at end of file diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_3.pdf b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_3.pdf new file mode 100644 index 0000000..6b35a03 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_3.pdf differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_3.svg b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_3.svg new file mode 100644 index 0000000..6554602 --- /dev/null +++ b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_3.svg @@ -0,0 +1,94 @@ + + + + + + + + + image/svg+xml + + + + + + RAID 3 + + + + B4 + + + + B1 + + + + A4 + + + + A1 + + + Disk 0 + + + + B5 + + + + B2 + + + + A5 + + + A2 + + Disk 1 + + + + B6 + + + + B3 + + + + A6 + + + + A3 + + + Disk 2 + + + + Bp(4-6) + + + Bp(1-3) + + + Ap(4-6) + + + + Ap(1-3) + + + Disk 3 + + + + + + + \ No newline at end of file diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_4.pdf b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_4.pdf new file mode 100644 index 0000000..1cae2b8 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_4.pdf differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_4.svg b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_4.svg new file mode 100644 index 0000000..941c59b --- /dev/null +++ b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_4.svg @@ -0,0 +1,94 @@ + + + + + + + + + image/svg+xml + + + + + + RAID 4 + + + + D1 + + + + C1 + + + + B1 + + + + A1 + + + Disk 0 + + + D2 + + + C2 + + + + B2 + + + A2 + + Disk 1 + + + + + D3 + + + + + C3 + + + + B3 + + + + A3 + + + Disk 2 + + + + Dp + + + Cp + + + Bp + + + + Ap + + + Disk 3 + + + + + + + \ No newline at end of file diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_5.pdf b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_5.pdf new file mode 100644 index 0000000..ce4a2e8 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_5.pdf differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_5.svg b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_5.svg new file mode 100644 index 0000000..d9e9a03 --- /dev/null +++ b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_5.svg @@ -0,0 +1,94 @@ + + + + + + + + + image/svg+xml + + + + + + RAID 5 + + + + Dp + + + + C1 + + + + B1 + + + + A1 + + + Disk 0 + + + D1 + + + Cp + + + + B2 + + + A2 + + Disk 1 + + + + + D2 + + + + + C2 + + + + Bp + + + + A3 + + + Disk 2 + + + + D3 + + + C3 + + + B3 + + + + Ap + + + Disk 3 + + + + + + + \ No newline at end of file diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_6.pdf b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_6.pdf new file mode 100644 index 0000000..a25d712 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_6.pdf differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_6.svg b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_6.svg new file mode 100644 index 0000000..54d0ec5 --- /dev/null +++ b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/RAID_6.svg @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + RAID 6 + + + + + Dp + + + + C1 + + + + B1 + + + + A1 + + + Disk 0 + + + + Dq + + + Cp + + + + B2 + + + A2 + + Disk 1 + + + + + + D1 + + + + + Cq + + + + Bp + + + + A3 + + + Disk 2 + + + + + D2 + + + C2 + + + Bq + + + + Ap + + + Disk 3 + + + + + D3 + + + C3 + + + B3 + + + + Aq + + + Disk 4 + + + + + + + Eq + E1 + E2 + E3 + Ep + + \ No newline at end of file diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/Red_x_large.png b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/Red_x_large.png new file mode 100644 index 0000000..32cfc74 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/Red_x_large.png differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/raidcolor.jpg b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/raidcolor.jpg new file mode 100644 index 0000000..4ade4e8 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/raidcolor.jpg differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/raidno.jpg b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/raidno.jpg new file mode 100644 index 0000000..77080b9 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/img/raid/raidno.jpg differ diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/presentation.tex b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/presentation.tex new file mode 100644 index 0000000..4ff5dc4 --- /dev/null +++ b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/presentation.tex @@ -0,0 +1,629 @@ +\documentclass[xcolor=dvipsnames,compress,italian]{beamer} +\usetheme{Necst} + +\begin{document} + +\title[RAID, LVM, LUKS]{RAID, LVM, LUKS: Play with disks.} + +\author[M. Polino]{Mario Polino} +\institute{ +\vspace{1cm} +\begin{columns} + \begin{column}{0.30\columnwidth} + \includegraphics[width=0.6\columnwidth]{img/PoliMI.eps}\hfill + \end{column} + \begin{column}{0.40\columnwidth} + \centering \scriptsize{Corsi Avanzati Linux - 2014} + \end{column} + \begin{column}{0.30\columnwidth} + \hfill\includegraphics[width=\columnwidth]{img/poul.pdf} + \end{column} +\end{columns} +} + +\date{} + +\frame[plain]{\vspace{1.1cm}\titlepage} + +\section[RAID]{ RAID } +\subsection{Intro} +\frame{\frametitle{RAID What?} + \begin{center} + \includegraphics<1>[height=0.8\textheight]{./img/raid/raidcolor.jpg} + \includegraphics<2>[height=0.8\textheight]{./img/raid/raidno.jpg} + \end{center} +} + +\frame{\frametitle{RAID} + \begin{block}{Redundant Array of Inexpensive(Independent) Disks} + \begin{itemize} + \item[ITA] un sistema informatico che usa un gruppo di dischi rigidi per condividere o replicare le informazioni + \item[ENG] schemes that can divide and replicate data among \textbf{multiple physical drives} + \end{itemize} + \end{block} + +} + +\subsection{Theory} + +\frame{\frametitle{RAID 0: Striping} + +\begin{columns} + \begin{column}{0.5\columnwidth} + \begin{block}{Pros} + \begin{itemize} + \item Alte prestazioni in scrittura e lettura. + \end{itemize} + \end{block} + \begin{alertblock}{Cons} + \begin{itemize} + \item Impossibile montare dischi hot-spare. + \item Affidabilità minore di un disco singolo. + \item Non è fault tolerant. + \end{itemize} + \end{alertblock} + \end{column} + \begin{column}{0.5\columnwidth} + \begin{center} + \includegraphics[height=0.8\textheight]{./img/raid/RAID_0.pdf} + \end{center} + \end{column} + +\end{columns} + +} + + +\frame{\frametitle{RAID 1: Mirroring} + +\begin{columns} + + \begin{column}{0.5\columnwidth} + \begin{center} + \includegraphics[height=0.8\textheight]{./img/raid/RAID_1.pdf} + \end{center} + \end{column} + \begin{column}{0.5\columnwidth} + \begin{block}{Pros} + \begin{itemize} + \item Affidabilità proporzionale al numero di dischi. + \item Fault tolerance. + \item Velocità di lettura dipende dal disco più veloce + \end{itemize} + \end{block} + \begin{alertblock}{Cons} + \begin{itemize} + \item Alto costo. + \item Velocità di scrittura dipende dal disco più lento. + \end{itemize} + \end{alertblock} + + + \end{column} + +\end{columns} + +} + +\frame{\frametitle{RAID 2,3: Never Implemented} + \begin{center} + \includegraphics[height=0.4\textheight]{./img/raid/RAID_2.pdf} + \end{center} + \begin{center} + \includegraphics[height=0.4\textheight]{./img/raid/RAID_3.pdf} + \end{center} + +} + +\frame{\frametitle{RAID 4: Block Level Striping with Dedicated Parity Disk} +\begin{columns} + \begin{column}{0.5\columnwidth} + \begin{center} + \includegraphics[width=0.9\textwidth]{./img/raid/RAID_4.pdf} + \end{center} + \end{column} + \begin{column}{0.5\columnwidth} + \begin{block}{Pros} + \begin{itemize} + \item Read veloci grazie al parallelismo della struttura. + \item Fault tolerance. + \item Possibilità di inserire dischi hot-spare. + \end{itemize} + \end{block} + \end{column} +\end{columns} + + \begin{alertblock}{Cons} + \begin{itemize} + \item Il disco utilizzato per la parità è il collo di bottiglia. + \item Scrittura lenta a causa del calcolo della parità + \end{itemize} + \end{alertblock} + +} + +\frame{\frametitle{RAID 5: Block Level Striping with Distributed Parity} +\begin{columns} + \begin{column}{0.5\columnwidth} + \begin{block}{Pros} + \begin{itemize} + \item Read veloci grazie al parallelismo della struttura. + \item Fault tolerance. + \item Possibilità di inserire dischi hot-spare. + \end{itemize} + \end{block} + \end{column} + \begin{column}{0.5\columnwidth} + \begin{center} + \includegraphics[width=0.9\textwidth]{./img/raid/RAID_5.pdf} + \end{center} + \end{column} + +\end{columns} + + \begin{alertblock}{Cons} + \begin{itemize} + \item Scrittura lenta a causa del calcolo della parità + \end{itemize} + \end{alertblock} + +} + +\frame{\frametitle{RAID 6: Block Level Striping with Double Distributed Parity} +\begin{columns} + \begin{column}{0.5\columnwidth} + \begin{block}{Pros} + \begin{itemize} + \item Read veloci grazie al parallelismo della struttura. + \item Fault tolerance. + \item Possibilità di inserire dischi hot-spare. + \end{itemize} + \end{block} + \end{column} + \begin{column}{0.5\columnwidth} + \begin{center} + \includegraphics[width=0.9\textwidth]{./img/raid/RAID_6.pdf} + \end{center} + \end{column} + +\end{columns} + + \begin{alertblock}{Cons} + \begin{itemize} + \item Scrittura \emph{`molto'} lenta a causa del calcolo della parità + \end{itemize} + \end{alertblock} + +} + +\frame{\frametitle{RAID 0+1 vs 1+0} +\begin{columns} + \begin{column}{0.5\columnwidth} + \begin{center} + \includegraphics[width=0.9\textwidth]{./img/raid/RAID_01.pdf} + \end{center} + \end{column} + \begin{column}{0.5\columnwidth} + \begin{center} + \includegraphics[width=0.9\textwidth]{./img/raid/RAID_10.pdf} + \end{center} + \end{column} + +\end{columns} + + \begin{alertblock}{} + \begin{itemize} + \item 1+0 è una scelta migliore. + \end{itemize} + \end{alertblock} + +} +\subsection{mdadm} + +\frame{\frametitle{mdadm - manage MD devices aka Linux Software RAID} +\begin{block} +\Large {mdadm [mode] [options] } +\end{block} +} + +\frame{\frametitle{mdadm - Supporto} + \begin{itemize} + \item RAID\textbf{0} + \item RAID\textbf{1} + \item RAID\textbf{4} + \item RAID\textbf{5} + \item RAID\textbf{6} + \item RAID\textbf{10} (1 + 0) + \item LINEAR (Come RAID0 con dischi di dimensione diversa) + \end{itemize} +} + +\frame{\frametitle{mdadm - mode} + \begin{itemize} + \item[-A] Assemble: Assembla i componenti di un array già creato in un block device attivo. + \item[-C] Create: Crea un nuovo array di dischi e lo attiva. + \item[-F] Follow/Monitor: Controlla lo stato dei dischi. + \item[-G] Grow: Cambia il numero di dischi il layout, etc. + \end{itemize} +} + +\frame{\frametitle{mdadm - Create} + + \begin{block}{} + \Large {mdadm -Cv /dev/md0 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1 --spare-devices=1 /dev/sde1} + \end{block} + } + +\frame{\frametitle{mdadm - Add/Remove per un Disco} + +\begin{block}{Add} + \Large {mdadm --add /dev/md0 /dev/sdb1} + \end{block} + +\begin{block}{Remove} + \Large {mdadm /dev/md0 --fail /dev/sda1 --remove /dev/sda1} + \end{block} + } +\frame{\frametitle{mdadm - Monitorare un Array} + +\begin{block}{} + \Large {mdadm --detail /dev/md0} +\end{block} + +\begin{block}{} + \Large {cat /proc/mdstat} +\end{block} + +\begin{alertblock}{} +Personalities : [raid1]\\ +md0 : active raid1 sdb1[1] sda1[0]\\ +104320 blocks [2/2] [UU]\\ + +md1 : active raid1 sdb3[1] sda3[0]\\ +19542976 blocks [2/2] [UU]\\ + +md2 : active raid1 sdb4[1] sda4[0]\\ +223504192 blocks [2/2] [UU]\\ +\end{alertblock} + } + +\frame{\frametitle{mdadm - Stop/Delete per un Array} + +\begin{block}{Stop} + \Large {mdadm --stop /dev/md0} + \end{block} + +\begin{block}{Delete} + \Large {mdadm --remove /dev/md0} + \end{block} + } + +\frame{\frametitle{mdadm - /etc/mdadm.conf} + \begin{block}{} + mdadm --examine --scan > /etc/mdadm.conf + + \end{block} + +} + +% \frame[plain]{\frametitle{} +% \huge{Demo} +% } + + +\section{LVM} +\subsection{Theory} + +\frame{\frametitle{Cosa è LVM?} + \begin{columns} + \begin{column}{0.5\columnwidth} + \begin{block}{\textbf{L}ogical \textbf{V}olume \textbf{M}anager} + Crea un livello di astrazione che permette di creare dischi logici che vengono poi archiviati in dischi fisici. + \end{block} + \end{column} + \begin{column}{0.5\columnwidth} + + \begin{center} + \includegraphics[width=\textwidth]{./img/LVM/lvm1.png} + \end{center} + \end{column} + \end{columns} +} + +% \frame{\frametitle{Cosa è LVM?} +% \begin{center} +% \includegraphics[width=0.5\textwidth]{./img/LVM/lvg.png} +% \end{center} + +% } +\frame{\frametitle{I Vantaggi di LVM} + + \begin{itemize} + \item \textbf{Capacità flessibile}: Un Filesystem può essere esteso su più dischi fisici. + \item \textbf{Storage ridimensionabile}: Si può fare il redimensionamento dei volumi logici senza intaccare le partizioni. + \item \textbf{Online data relocation}: Puoi riposizionare i dati mentra il sistama è attivo. Per esempio puoi decidere di svuotare completamente un disco prima di rimuoverlo. + + \item \textbf{Nomi significativi}: I volumi possono essere raggruppati e nominati a piacimento dell'utente. + + \item \textbf{Disk striping}: Simile al RAID0 + + \item \textbf{Mirroring volumes}: Simile al RAID1 + + \item \textbf{Volume Snapshot}: Si possono creare snapshot dei volumi (e quindi fare modifiche che non modificano i dati reali) + + \end{itemize} + +} +\subsection{Commands} + +\frame{\frametitle{lvm - Gestire i volumi fisici} + +\begin{block}{pvcreate /dev/sda2} + inizializza la partizione \emph{/dev/sda2} per l'uso di LVM (Si può usare anche su interi dischi) + \end{block} + +\begin{alertblock}{pvscan} + pvscan scans all supported LVM block devices in the system for physical volumes. + \end{alertblock} + +\begin{alertblock}{pvdisplay} + Mostra le informazioni su un volume fisico + \end{alertblock} + + + + } + + +\frame{\frametitle{lvm - Creare gruppi di volumi} + +\begin{block}{vgcreate VolGroup00 /dev/sda2} + Crea un nuovo gruppo di volumi di nome \emph{VolGroup00} che contiene il disco \emph{/dev/sda2} + \end{block} + +\begin{block}{vgextend VolGroup00 /dev/sdb1} + Aggiunge la partizione \emph{/dev/sdb1} al gruppo \emph{VolGroup00} + \end{block} + +\begin{alertblock}{vgscan} + Legge tutti i dischi alla ricerca di volumi fisici che contengono metadati di LVM. + \end{alertblock} + + \begin{alertblock}{vgdisplay} + Mostra informazioni sui Volume Group + \end{alertblock} + } + +\frame{\frametitle{lvm - Creare i volumi logici lineari} + +\begin{block}{lvcreate -L 10G VolGroup00 -n lvolhome} + Crea un volume logico di 10GB nome \emph{lvolhome}\\ + Il volume è accessibile da \emph{/dev/mapper/VolGroup00-lvolhome} o \emph{/dev/VolGroup00/lvolhome}\\ + Si può usare l'opzione \emph{-C y} per assicurarsi che il volume sia contiguo. + \end{block} + +\begin{block}{lvcreate -l +100\%FREE VolGroup00 -n lvolmedia} + Crea un volume logico che occupa tutto il restante spazio disponibile \\ + \end{block} + + \begin{alertblock}{lvdisplay} + Mostra informazioni sui Volumi logici + \end{alertblock} + } + +\frame{\frametitle{lvm - Creare i volumi logici stripped} + + \begin{center} + \includegraphics[width=0.5\textwidth]{./img/LVM/stripped.png} + \end{center} + + \begin{block}{lvcreate -L 10G \textbf{-i2 -I64} -n example VolGroup00} + Crea un volume logico stile RAID 0 con blocchi di dimensione di 64 kb, dimensione 10G, usando due volumi fisici. + \end{block} + + \begin{alertblock}{} + Hai bisogno di \textbf{almeno 2} volumi fisici + \end{alertblock} + } + + \frame{\frametitle{lvm - Creare i volumi logici mirrored} + \begin{columns} + \begin{column}{0.5\columnwidth} + \begin{center} + \includegraphics[width=\textwidth]{./img/LVM/mirrored.png} + \end{center} + \end{column} + \begin{column}{0.5\columnwidth} + \begin{alertblock}{} + Hai bisogno di \textbf{almeno 3} volumi fisici, il terzo è usato per log relativi al mirroring + \end{alertblock} + \begin{block}{lvconvert -m1 /dev/vg00/lv0} + Il mirroring può essere aggiunto o eliminato (-m0) anche da un volume già esistente + \end{block} + + \end{column} + + + \end{columns} + \begin{block}{lvcreate -L 10G \textbf{-m1} -n mirrorexample VolGroup00} + Crea un volume logico con un mirror (stile RAID 1) di dimensione 10G. + \end{block} + } + + +\frame{\frametitle{lvm - Snapshot} + +\begin{block}{COW (copy-no-write)} + Lo snapshot iniziale conterrà hard-link agli inode dei dati attuali. Fino a che i dati restano invariati, lo snapshot conterrà solo i link agli inode e non i dati stessi. Quando verrà modificato un file o una cartella ai quali lo snapshot punta, LVM automaticamente clonerà i dati, la vecchia copia referenziata dallo snapshot, e la nuova copia referenziata dall'attuale sistema. + \end{block} + +\begin{block}{lvcreate --size 100M --snapshot --name snap01 /dev/mapper/vg0-pv} + Crea un nuovo volume logico basato su \emph{/dev/mapper/vg0-pv} con massi 100MB di modifiche apportabili. + \end{block} + + + } + +\section{LUKS} + +\subsection{Theory} + +\frame{\frametitle{Cosa è LUKS?} + + \begin{center} + \includegraphics[width=0.7\textwidth]{./img/LUKS/luks-logo.png} + \end{center} + + + \begin{block}{\textbf{L}inux \textbf{U}nified \textbf{K}ey \textbf{S}etup} + è lo standard per hard disk cifrati su linux. + \end{block} + +} +\frame{\frametitle{I Vantaggi di LUKS} + + \begin{block}{} + \begin{itemize} + \item Compatibilità via standardizzazione. + \item Sicuro contro attacchi low entropy. + \item Supporto per multi key. + \item Effective passphrase revocation. + \item Free + \end{itemize} + \end{block} +} + + +\frame{\frametitle{Wipe the Disk} + + + \begin{block}{cat /dev/zero > /dev/sdx} + Scrive zero sul disco \emph{sdx}.\\ + Se il disco è stato usato in precedenza, è una buona idea fare un wipe prima di creare un LUKS + container per rimuovere ogni traccia del vecchio filesystem e dei vecchi dati. + \end{block} + + \begin{block}{} + dd if=/dev/urandom of=/dev/sdx + \end{block} + + \begin{alertblock}{Flash memory/SSD} + Le memorie SSD e/o flash adottano un livello di astrazione per cui i dati non sono scritti esattamente nel settore indicato. Alcuni fanno addirittura la compressione dei dati, quindi scrivere solo zeri risulta in avere sovrascritto poco spazio. \url{https://www.usenix.org/legacy/events/fast11/tech/full_papers/Wei.pdf} + \end{alertblock} + +} + +\frame{\frametitle{The Command} + + \begin{block}{} + cryptsetup + \end{block} + + \begin{block}{Mode} + \begin{itemize} + \item \textbf{LUKS}: Default + \item plain: Per usare dm-crypt in plain mode + \item loopaes: legacy mode + \item tcrypt: Modo compatibile con Truecrypt + + \end{itemize} + \end{block} +} + +\frame{\frametitle{Format/Open} + + \begin{block}{cryptsetup -v --cipher aes-xts-plain64 --key-size 512 --hash sha1 --iter-time 1000 \textbf{luksFormat} } + \emph{--chiper} per impostare il cifrario da usare (aes-xts-plain64)\\ + \emph{--key-size} dimensione della chiave (256)\\ + \emph{--hash} funzione di hash per PBKDF2 (sha1)\\ + \emph{--iter-time} numero di millisecondi spesi dentro PBKDF2 (1000)\\ + \end{block} + + \begin{block}{cryptsetup \textbf{open --type luks} /dev/sdx chipDevice} + Apre la partizione cifrata \emph{sdx} creando un device a blocchi \emph{/dev/mapper/chipDevice} che si può utilizzare come un normale disco. + \end{block} +} +\frame{\frametitle{Keyfiles} + + \begin{block}{dd if=/dev/urandom of=mykeyfile bs=512 count=4} + Genera un file \emph{mykeyfile} e lo riempie di dati random + \end{block} + + \begin{block}{cryptsetup -c -s luksFormat /dev/ \textbf{/path/to/mykeyfile}} + Crea un disco cifrato e usa \emph{mykeyfile} come chiave di cifratura. + \end{block} + + \begin{block}{cryptsetup \textbf{open --type luks} --key-file \textbf{/path/to/mykeyfile} /dev/sdx chipDevice} + Apre la partizione cifrata \emph{sdx} usanto \emph{mykeyfile} come file. + \end{block} + \begin{block}{} + \footnotesize Si può utilizzare come chiave sia un file che un device a blocchi (una partizione, magari su un dispositivo rimovibile). Si può utilizzare l'opzione \emph{--keyfile-offset} per indicare l'offset di inizio della chiave sul file/dispositivo e \emph{--keyfile-size} per indicare la quantità di dati da considerare per la chiave. + \end{block} +} + +\frame{\frametitle{Key management /1} + + \begin{alertblock}{} + Si possono usare fino a \textbf{8} chiavi differenti. I key slot vanno da 0 a 7 + \end{alertblock} + + \begin{block}{cryptsetup luksDump /dev/} + Informazioni sul device cifrato e sulle chiavi utilizzate + \end{block} + + \begin{block}{cryptsetup luksAddKey /dev/ [/path/to/] [-d /path/to/]} + Aggiunge una nuova chiave nel primo slot libero. Per l'aggiunta di una nuova chiave bisogna essere in possesso di almeno una delle vecchie.\\ + \emph{-d} è usata per indicare il percorso del keyfile da utilizzare come chiave.\\ + \emph{-S} specifica lo slot nel quale si vuole aggiungere la chiave. + \end{block} +} + +\frame{\frametitle{Key management /2} + + \begin{block}{cryptsetup luksChangeKey /dev/ -S 6 } + Cambia la chiave dello slot 6. Bisogna essere a conoscenza della chiave che si sta cambiando. + \end{block} + + + \begin{alertblock}{} + Con entrambe le opzioni seguenti è possibile rimuovere anche l'ultima chiave rimasta e quindi rendere i dati persi per sempre. + \end{alertblock} + + \begin{block}{cryptsetup luksRemoveKey /dev/} + Rimuove la chiave inserita. + \end{block} + + \begin{block}{cryptsetup luksKillSlot /dev/ 6} + Rimuove la chiave nello slot 6 con una qualsiasi altra chiave. + \end{block} +} + +\frame{\frametitle{Backup LUKS Header} + + \begin{alertblock}{} + L'header della partizione cifrata è di vitale importanza per poter accedere hai dati contenuti, quindi un danno accidentale a questa sezione può rendere inaccessibili tutti i dati. + \end{alertblock} + + \begin{block}{cryptsetup luksHeaderBackup /dev/sdx --header-backup-file /path/to/header.img} + Salva in \emph{header.img} una copia di backup del header della partizione \emph{sdx} + \end{block} +} +\frame{\frametitle{Restore LUKS Header} + + \begin{block}{cryptsetup -v --header /path/to/header.img open /dev/sdx testHead} + Apre il device \emph{sdx} utilizzando l'header \emph{header.img}. Non sovrascrive l'header originale del device. \'E utile per controllare che l'header sia corretto prima di fare il Restore. + \end{block} + + \begin{block}{cryptsetup luksHeaderRestore /dev/sdx --header-backup-file ./path/to/header.img} + Sovrascrive l'header del dispositivo \emph{sdx} con il backup contenuto in \emph{header.img} + \end{block} + + +} + + +\section*{} +\frame[plain]{\frametitle{} + \huge{Grazie per l'attenzione.} +} +\end{document} \ No newline at end of file diff --git a/Corsi GNU Linux Avanzati/Gestione dei dischi 2/reference b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/reference new file mode 100644 index 0000000..c32ae14 --- /dev/null +++ b/Corsi GNU Linux Avanzati/Gestione dei dischi 2/reference @@ -0,0 +1,9 @@ +A Case for Redundant Arrays of Inexpensive Disks (RAID) 1988 Patterson + +http://www.tldp.org/HOWTO/Software-RAID-HOWTO-5.html + +https://raid.wiki.kernel.org/index.php/Partition_Types + +http://www.slashroot.in/advanced-guide-lvm-logical-volume-management-linux-part-1 + +https://wiki.archlinux.org/index.php/LVM diff --git a/Corsi GNU Linux Avanzati/Gestione del software/Gestione Software.lyx b/Corsi GNU Linux Avanzati/Gestione del software/Gestione Software.lyx new file mode 100644 index 0000000..29b625c --- /dev/null +++ b/Corsi GNU Linux Avanzati/Gestione del software/Gestione Software.lyx @@ -0,0 +1,1438 @@ +#LyX 2.0 created this file. For more info see http://www.lyx.org/ +\lyxformat 413 +\begin_document +\begin_header +\textclass beamer +\begin_preamble +\usetheme{Madrid} +% \usecolortheme{crane} +% Decommentate se la volete GIALLA +% http://www.hartwork.org/beamer-theme-matrix/ per esempi di temi e colori + + +% set fonts for nicer pdf view +\IfFileExists{lmodern.sty}{\usepackage{lmodern}}{} + +\setbeamercovered{transparent} +% or whatever (possibly just delete it) + +\titlegraphic{\includegraphics[height=2cm]{poul-logo.pdf}} +% Ricordate che dovete sempre avere il logo in pdf nella cartella dove avete il documento +\end_preamble +\use_default_options false +\maintain_unincluded_children false +\language english +\language_package default +\inputencoding auto +\fontencoding global +\font_roman times +\font_sans default +\font_typewriter default +\font_default_family default +\use_non_tex_fonts false +\font_sc false +\font_osf false +\font_sf_scale 100 +\font_tt_scale 100 + +\graphics default +\default_output_format default +\output_sync 0 +\bibtex_command default +\index_command default +\paperfontsize default +\spacing single +\use_hyperref false +\papersize default +\use_geometry true +\use_amsmath 2 +\use_esint 0 +\use_mhchem 1 +\use_mathdots 1 +\cite_engine basic +\use_bibtopic false +\use_indices false +\paperorientation portrait +\suppress_date false +\use_refstyle 0 +\index Index +\shortcut idx +\color #008000 +\end_index +\secnumdepth 2 +\tocdepth 2 +\paragraph_separation indent +\paragraph_indentation default +\quotes_language english +\papercolumns 1 +\papersides 1 +\paperpagestyle default +\tracking_changes false +\output_changes false +\html_math_output 0 +\html_css_as_file 0 +\html_be_strict false +\end_header + +\begin_body + +\begin_layout Standard +\begin_inset Note Note +status open + +\begin_layout Plain Layout +Andate in Documento -> Impostazioni -> Preambolo di LaTeX per dare un occhio + ad alcune opzioni +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Section* +Title screen +\end_layout + +\begin_layout Title +Gestione del software +\begin_inset Argument +status open + +\begin_layout Plain Layout +Gestione Software +\begin_inset Note Note +status open + +\begin_layout Plain Layout +opzionale, è quello che viene scritto in basso al centro +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Subtitle +Installazione e gestione repository +\end_layout + +\begin_layout Author +Andrea Gussoni +\begin_inset Newline newline +\end_inset + + +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +href{mailto:andrealinux1@gmail.com}{ +\backslash +nolinkurl{andrealinux1@gmail.com}} +\end_layout + +\end_inset + + +\begin_inset Argument +status open + +\begin_layout Plain Layout +Andrea Gussoni +\end_layout + +\end_inset + + +\begin_inset Note Note +status open + +\begin_layout Plain Layout +Lo so è un pò brutto, ma non ho trovato di meglio per far vedere autore + e mail con link mailto funzionante nella prima pagina. +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Date +Corsi Gnu/Linux Avanzati 2014 +\begin_inset Argument +status open + +\begin_layout Plain Layout +Corsi Linux Avanzati 2014 +\begin_inset Note Note +status open + +\begin_layout Plain Layout +opzionale, è quello che viene scritto in basso a destra +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Note Note +status open + +\begin_layout Plain Layout +If you wish to uncover everything in a step-wise fashion, uncomment the + following command: +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +beamerdefaultoverlayspecification{<+->} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Note Note +status open + +\begin_layout Plain Layout +Structuring a talk is a difficult task and the following structure may not + be suitable. + Here are some rules that apply for this solution: +\end_layout + +\begin_layout Itemize +Exactly two or three sections (other than the summary). + +\end_layout + +\begin_layout Itemize +At *most* three subsections per section. + +\end_layout + +\begin_layout Itemize +Talk about 30s to 2min per frame. + So there should be between about 15 and 30 frames, all told. +\end_layout + +\begin_layout Itemize +A conference audience is likely to know very little of what you are going + to talk about. + So *simplify*! +\end_layout + +\begin_layout Itemize +In a 20min talk, getting the main ideas across is hard enough. + Leave out details, even if it means being less precise than you think necessary. + +\end_layout + +\begin_layout Itemize +If you omit details that are vital to the proof/implementation, just say + so once. + Everybody will be happy with that. + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Section +Introduzione +\end_layout + +\begin_layout BeginFrame +Introduzione +\end_layout + +\begin_layout FrameSubtitle +\begin_inset Note Note +status open + +\begin_layout Plain Layout +A title should summarize the slide in an understandable fashion for anyone + how does not follow everything on the slide itself. + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Itemize +Breve introduzione agli argomenti del talk +\end_layout + +\begin_layout Itemize +Domande preliminari? +\end_layout + +\begin_layout BeginFrame +La Compilazione +\end_layout + +\begin_layout Itemize +Pro: ottimizzazione, personalizzazione, possibile eventuale controllo sui + sorgenti +\end_layout + +\begin_layout Itemize +Contro: dispendiosa in termini di tempo e risorse, +\begin_inset Quotes eld +\end_inset + +frammentazione +\begin_inset Quotes erd +\end_inset + + del software nel pc, non risolve automaticamente le dipendenze +\end_layout + +\begin_layout Itemize +Come risolvere? +\end_layout + +\begin_layout Section +Pacchetti +\end_layout + +\begin_layout BeginFrame +I Pacchetti Precompilati +\end_layout + +\begin_layout Itemize +I principali e più utilizzati formati +\end_layout + +\begin_deeper +\begin_layout Itemize +.deb (formato di Debian) +\end_layout + +\begin_layout Itemize +.rpm (formato di Red Hat) +\end_layout + +\end_deeper +\begin_layout Itemize +Altri formati +\end_layout + +\begin_deeper +\begin_layout Itemize +.tgz (formato di Slackware) +\end_layout + +\begin_layout Itemize +.pkg.tar.xz (formato di Arch Linux) +\end_layout + +\end_deeper +\begin_layout BeginFrame +Principali Operazioni +\end_layout + +\begin_layout Itemize +Installazione di un pacchetto +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +dpkg -i pacchetto.deb +\end_layout + +\begin_layout Itemize + +\emph on +rpm -i pacchetto.rpm +\end_layout + +\end_deeper +\begin_layout Itemize +Rimozione di un pacchetto +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +dpkg -r pacchetto.deb +\end_layout + +\begin_layout Itemize + +\emph on +rpm -r pacchetto.rpm +\end_layout + +\end_deeper +\begin_layout Section +Package Manager +\end_layout + +\begin_layout BeginFrame +Ancora non basta +\end_layout + +\begin_layout Itemize +Ora l'installazione non richiede la compilazione +\end_layout + +\begin_layout Itemize +Possiamo facilmente gestire i programmi installati, rimuovendo all'atto + della disinstallazione tutta la +\begin_inset Quotes eld +\end_inset + +sporcizia +\begin_inset Quotes erd +\end_inset + + +\end_layout + +\begin_layout Itemize +Però: +\end_layout + +\begin_deeper +\begin_layout Itemize +Abbiamo bisogno dei binari per la nostra architettura +\end_layout + +\begin_layout Itemize +Le dipendenze vanno ancora soddisfatte manualmente +\end_layout + +\begin_layout Itemize +All'uscita di una nuova versione di un programma dobbiamo scaricare di nuovo + il pacchetto e procedere al suo aggiornamento manualmente +\end_layout + +\end_deeper +\begin_layout BeginFrame +I Package Manager +\end_layout + +\begin_layout Itemize +Apt per gestire il formato +\begin_inset Quotes eld +\end_inset + +.deb +\begin_inset Quotes erd +\end_inset + +, Yum per gestire il formato +\begin_inset Quotes eld +\end_inset + +.rpm +\begin_inset Quotes erd +\end_inset + + +\end_layout + +\begin_layout Itemize +Cos'è e come funziona un repository +\end_layout + +\begin_layout Itemize +Le principali distribuzioni offrono i propri repository ufficiali +\end_layout + +\begin_deeper +\begin_layout Itemize +Ubuntu ~47000 pacchetti deb +\end_layout + +\begin_layout Itemize +Debian ~37000 pacchetti deb +\end_layout + +\begin_layout Itemize +Fedora ~22000 pachheti rpm +\end_layout + +\begin_layout Itemize +OpenSuse ~40000 pacchetti rpm +\end_layout + +\end_deeper +\begin_layout Itemize +Si possono anche aggiungere dei repository +\begin_inset Quotes eld +\end_inset + +fidati +\begin_inset Quotes erd +\end_inset + + aggiuntivi al proprio sistema +\end_layout + +\begin_layout BeginFrame +Adesso Ci Siamo +\end_layout + +\begin_layout Itemize +Unico +\begin_inset Quotes eld +\end_inset + +posto +\begin_inset Quotes erd +\end_inset + + dove cercare il software che ci serve +\end_layout + +\begin_layout Itemize +Dipendenze automaticamente risolte +\end_layout + +\begin_layout Itemize +Gestione centralizzata e automatica degli aggiornamenti +\end_layout + +\begin_layout Itemize +Software compilato per la nostra architettura e verificato dai mantainer + della nostra distribuzione +\end_layout + +\begin_layout Subsection +Apt +\end_layout + +\begin_layout BeginFrame +Apt +\end_layout + +\begin_layout Itemize +\begin_inset Quotes eld +\end_inset + +Advanced Packaging Tool +\begin_inset Quotes erd +\end_inset + + +\end_layout + +\begin_layout Itemize +Usato dalle principali distribuzioni Debian Based (Ubuntu, Linux Mint) +\end_layout + +\begin_layout Itemize +Esiste anche +\begin_inset Quotes eld +\end_inset + +Aptitude +\begin_inset Quotes erd +\end_inset + + per i nostalgici dell'interfaccia grafica +\end_layout + +\begin_layout BeginFrame +Comandi +\end_layout + +\begin_layout Itemize +Prima di tutto dobbiamo aggiornare il database dei pacchetti +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +apt-get update +\end_layout + +\end_deeper +\begin_layout Itemize +Installazione +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +apt-get install pacchetto +\end_layout + +\end_deeper +\begin_layout Itemize +Rimozione +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +apt-get remove pacchetto +\end_layout + +\end_deeper +\begin_layout Itemize +Ricerca di un pacchetto nel database +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +apt-cache search pacchetto +\end_layout + +\end_deeper +\begin_layout Itemize +Informazioni aggiuntive sul paccheto +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +apt-cache show +\emph default + +\emph on +pacchetto +\end_layout + +\end_deeper +\begin_layout BeginFrame +Comandi +\end_layout + +\begin_layout Itemize +Aggiornamento dei pacchetti +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +apt-get upgrade +\end_layout + +\begin_layout Itemize + +\emph on +apt-get dist-upgrade +\end_layout + +\begin_layout Itemize +il primo comando esegue solo l'aggiornamento alle nuove versioni dei pacchetti + disponibili senza però aggiornare i pacchetti che richiedono installare + o rimuovere altri pacchetti, mentre dist-upgrade aggiorna anche questi + ultimi +\end_layout + +\end_deeper +\begin_layout BeginFrame +Comandi +\end_layout + +\begin_layout Itemize +Altri comandi utili: +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +apt-get autoremove +\emph default + -- elimina tutti i pacchetti non necessari al corretto funzionamento del + sistema +\end_layout + +\begin_layout Itemize + +\emph on +apt-get clean +\emph default + -- pulisce la cache (utile per liberare un po di spazio in /var) +\end_layout + +\begin_layout Itemize + +\emph on +apt-get purge +\emph default + -- rimuove un pacchetto andando però ad eliminare anche i file di configurazion +e ad esso collegato +\end_layout + +\begin_layout Itemize + +\emph on +apt-get +\begin_inset ERT +status open + +\begin_layout Plain Layout + +- +\backslash +/- +\end_layout + +\end_inset + +no-install-recommends -- +\emph default +installa un pacchetto evitando però di installare i pacchetti consigliati, + ad esempio la documentazione eccetera... +\end_layout + +\end_deeper +\begin_layout BeginFrame +Comandi +\end_layout + +\begin_layout Itemize +Altri comandi utili basati su dpkg: +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +dpkg -l pacchetto -- +\emph default + simile ad +\emph on +apt-cache search +\emph default +ma in più mostra se il pacchetto è installato o no +\end_layout + +\begin_layout Itemize + +\emph on +dpkg -L pacchetto +\emph default + -- elenca i file installati nel sistema da un dato pacchetto +\end_layout + +\begin_layout Itemize + +\emph on +dpkg -S +\emph default +nomefile -- cerca il file e dice a quale pacchetto appartiene +\end_layout + +\end_deeper +\begin_layout BeginFrame +Approfondimenti -- /var/cache/apt +\end_layout + +\begin_layout Itemize +Apt tiene una repository locale dei pacchetti che vengono installati in + /var/cache/apt, e nel caso abbiate una /var su partizione separata questa + si può riempire facilmente, potete ovviare a questo con il comando citato + precedentemente. + Questa cache però in condizioni normali può essere utile per velocizzare + le operazioni di installazione e rimozione di grandi pacchetti +\end_layout + +\begin_layout BeginFrame +Approfondimenti -- unattended-upgrades +\end_layout + +\begin_layout Itemize +Esiste la possibilità di far eseguire automaticamente gli aggiornamenti + di sicurezza al momento della loro pubblicazione nei repository +\end_layout + +\begin_layout Itemize +Molto utile per le macchine server, perchè abbiamo le vulnerabilità fixate + senza il bisogno di un nostro intervento manuale +\end_layout + +\begin_layout Itemize +Maggiori informazioni +\begin_inset Foot +status open + +\begin_layout Plain Layout +https://wiki.debian.org/UnattendedUpgrades +\end_layout + +\end_inset + + +\end_layout + +\begin_layout BeginFrame +Apt-File +\end_layout + +\begin_layout Itemize +Utilizzo: +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +apt-file update -- +\emph default +aggiorna il database del programma +\end_layout + +\begin_layout Itemize + +\emph on +apt-file search nomefile -- +\emph default + restituisce il pacchetto a cui appartiene il file passato come argomento +\end_layout + +\begin_layout Itemize + +\emph on +apt-file list nomepacchetto -- +\emph default +elenca tutti i file che appartengono ad un certo pacchetto +\end_layout + +\end_deeper +\begin_layout BeginFrame +I Repository +\end_layout + +\begin_layout Itemize +il file /etc/apt/sources.list +\end_layout + +\begin_layout Standard +\begin_inset Graphics + filename /home/andrea/Pictures/Screenshot from 2014-03-14 21:52:02.png + width 100page% + height 100page% + keepAspectRatio + +\end_inset + + +\end_layout + +\begin_layout BeginFrame +I Repository +\end_layout + +\begin_layout Itemize +Demo +\end_layout + +\begin_layout BeginFrame +I Repository +\end_layout + +\begin_layout Itemize +Possiamo aggiungere altri repository +\end_layout + +\begin_deeper +\begin_layout Itemize +se il repository si trova su launchpad basta usare: +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +add-apt-repository ppa:utente/nome-ppa +\end_layout + +\end_deeper +\begin_layout Itemize +altrimenti dobbiamo aggiungere +\begin_inset Quotes eld +\end_inset + +a mano +\begin_inset Quotes erd +\end_inset + + al file sources.list l'indirizzo del repository, ricordandoci di aggiungere + anche la chiave per verificare la firma dei pacchetti +\begin_inset Foot +status open + +\begin_layout Plain Layout +http://wiki.ubuntu-it.org/Repository/RigaDiComando +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Itemize +ricordarsi sempre di aggiornare il database dei pacchetti dopo aver aggiunto + un repository, altrimenti il package manager non +\begin_inset Quotes eld +\end_inset + +vedrà +\begin_inset Quotes erd +\end_inset + + la nuova risorsa +\end_layout + +\end_deeper +\begin_layout Subsection +Yum +\end_layout + +\begin_layout BeginFrame +Yum +\end_layout + +\begin_layout Itemize +Yellowdog Updater, Modified +\end_layout + +\begin_layout Itemize +Package manager standard di molte distribuzione rpm-based (RHEL, CentOS, + Fedora, OpenSuse) +\end_layout + +\begin_layout Itemize +A differenza di Apt non richiede ogni volta l'aggiornamento esplicito del + database dei pacchetti +\end_layout + +\begin_layout BeginFrame +Comandi +\end_layout + +\begin_layout Itemize +Installazione +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +yum install pacchetto +\end_layout + +\end_deeper +\begin_layout Itemize +Rimozione (rimuove anche i file di configurazione, come +\emph on +apt-get purge +\emph default +) +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +yum remove pacchetto +\end_layout + +\end_deeper +\begin_layout Itemize +Ricerca nel database +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +yum search pacchetto +\end_layout + +\end_deeper +\begin_layout Itemize +Informazioni aggiuntive +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +yum info pacchetto +\end_layout + +\end_deeper +\begin_layout BeginFrame +Comandi +\end_layout + +\begin_layout Itemize +Aggiornamento dei pacchetti +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +yum update +\end_layout + +\begin_layout Itemize + +\emph on +yum distro-sync +\end_layout + +\end_deeper +\begin_layout Itemize +Altri comandi utili +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +yum clean packages : +\emph default +Pulizia della cache +\end_layout + +\begin_layout Itemize + +\emph on +yum autoremove : +\emph default +Rimozione dei pacchetti non più necessari +\end_layout + +\end_deeper +\begin_layout BeginFrame +I Repository +\end_layout + +\begin_layout Itemize +In questo caso i file che contengono le informazioni sui repository si trovano + in +\emph on +/etc/yum.repos.d +\emph default +ed hanno estensione +\begin_inset Quotes eld +\end_inset + +.repo +\begin_inset Quotes erd +\end_inset + + +\end_layout + +\begin_layout Itemize +Un esempio : un file chiamato +\begin_inset Quotes eld +\end_inset + +example.repo +\begin_inset Quotes erd +\end_inset + + contiene al suo interno +\end_layout + +\begin_layout ExampleBlock +.[examplerepo] +\end_layout + +\begin_layout ExampleBlock +name=Example Repository +\end_layout + +\begin_layout ExampleBlock +baseurl=http://mirror.cisp.com/CentOS/6/os/i386/ +\end_layout + +\begin_layout ExampleBlock +enabled=1 +\end_layout + +\begin_layout ExampleBlock +gpgcheck=1 +\end_layout + +\begin_layout ExampleBlock +gpgkey=http://mirror.cisp.com/CentOS/6/os/i386/RPM-GPG-KEY-CentOS-6 +\end_layout + +\begin_layout Section +Alien +\end_layout + +\begin_layout BeginFrame +Alien +\end_layout + +\begin_layout Itemize +Esiste eventualmente anche la possibilità di convertire da formato +\begin_inset Quotes erd +\end_inset + +deb +\begin_inset Quotes erd +\end_inset + + a formato +\begin_inset Quotes eld +\end_inset + +rpm +\begin_inset Quotes erd +\end_inset + + e viceversa i pacchetti tramite Alien, la sintassi è : +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +alien +\emph default + +\begin_inset ERT +status open + +\begin_layout Plain Layout + +- +\backslash +/- +\end_layout + +\end_inset + + +\emph on +to-deb pacchetto.rpm ( +\emph default +da rpm a deb +\emph on +) +\end_layout + +\begin_layout Itemize + +\emph on +alien +\begin_inset ERT +status open + +\begin_layout Plain Layout + +- +\backslash +/- +\end_layout + +\end_inset + +to-rpm pacchetto.deb (viceversa) +\end_layout + +\end_deeper +\begin_layout Section +Compilazione +\end_layout + +\begin_layout BeginFrame +Tutto Qui? Ni +\end_layout + +\begin_layout Itemize +I package manager e i comandi che abbiamo visto in precedenza sono assolutamente + sufficienti per la normale amministrazione di un server, poichè tutti i + pacchetti di maggiore utilità sono inclusi nei repository, ed i manutentori + di tutte le distro che abbiamo citato sono affidabili per quanto riguarda + gli aggiornamenti di sicurezza +\end_layout + +\begin_layout Itemize +Ovviamente esistono gli equivalenti per le distro che non abbiamo visto + in dettaglio, dato che non hanno una innata orientazione server, anche + se in fondo nessuno vi vieta di usare la vostra distribuzione preferita + per il vostro server, in fondo il bello di Gnu/Linux è proprio questo +\end_layout + +\begin_layout Itemize +Nel caso foste interessati vi invito a cercare nelle documentazione della + vostra distribuzione, e come +\begin_inset Quotes eld +\end_inset + +cheatsheet +\begin_inset Quotes erd +\end_inset + + vi consiglio la +\begin_inset Quotes eld +\end_inset + +Stele Di Rosetta +\begin_inset Quotes erd +\end_inset + + che trovate sulla wiki di Arch +\begin_inset Foot +status open + +\begin_layout Plain Layout +https://wiki.archlinux.org/index.php/Pacman_Rosetta +\end_layout + +\end_inset + + +\end_layout + +\begin_layout BeginFrame +La Via Più Ripida +\end_layout + +\begin_layout Itemize +Esiste anche la possibilità di compilare il software direttamente dai sorgenti + (Gentoo usa questa filosofia per l'intera distribuzione) +\end_layout + +\begin_layout Itemize +Solitamente è l'ultima via che viene considerata, perchè come detto in precedenz +a compilare da sorgenti significa non avere nessun controllo o aiuto da + parte del sistema, e quindi dover sistemare eventuali dipendenze e incompatibil +ità a mano, oltre a dover poi rimuovere tutti i file che vengono installati + se non dovessimo più avere bisogno del software +\end_layout + +\begin_layout Itemize +In alcuni casi (software particolarmente nuovi o di nicchia) la compilazione + da sorgenti può essere l'unica soluzione, cercherò quindi di darvi qualche + indicazione di massima per indirizzarvi sulla strada giusta +\end_layout + +\begin_layout BeginFrame +I Grandi Classici +\end_layout + +\begin_layout Itemize +La compilazione da sorgenti spesso viene ridotta ai seguenti comandi +\end_layout + +\begin_deeper +\begin_layout Itemize + +\emph on +./configure +\end_layout + +\begin_layout Itemize +make +\end_layout + +\begin_layout Itemize +make install +\end_layout + +\end_deeper +\begin_layout Itemize +Spesso non è esattamente così, per ogni software che si va a compilare e + altamente consigliata la lettura del file README all'interno dell'archivio, + che può illuminare sulla procedura da seguire, e spesso chiarisce anche + le dipendenze necessarie +\end_layout + +\begin_layout Itemize +Infatti generalmente il primo passo della procedura è volto proprio a verificare + requisiti e dipendenze, ed in caso di errore sarete voi a dover interpretare + l'output del programma per capire dove e perchè si è fermato, procedendo + quindi a risolvere il problema +\end_layout + +\begin_layout BeginFrame +Checkinstall +\end_layout + +\begin_layout Itemize +Permette di installare da sorgenti tenendo traccia però dell'installazione + in modo da rimuovere facilmente in futuro +\end_layout + +\begin_layout Itemize + +\emph on +checkinstall +\emph default +al posto di +\emph on +make install +\end_layout + +\begin_layout Itemize +più informazioni a +\begin_inset Foot +status open + +\begin_layout Plain Layout +http://wiki.ubuntu-it.org/Programmazione/Checkinstall +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Section* +Appendice +\end_layout + +\begin_layout BeginFrame +Domande? +\end_layout + +\begin_layout Pause + +\end_layout + +\begin_layout Standard +Demo! +\end_layout + +\begin_layout BeginFrame +Fonti +\end_layout + +\begin_layout Itemize +Unix and Linux System Administration Handbook (Fourth Edition) +\end_layout + +\begin_layout Itemize +Ubuntu-Wiki +\end_layout + +\begin_layout Itemize +Debian-Wiki +\end_layout + +\begin_layout Itemize +Fedora Project-Wiki +\end_layout + +\begin_layout Subsection* +Licenza +\end_layout + +\begin_layout BeginFrame +License +\end_layout + +\begin_layout Standard +\align center + +\size largest +Grazie per l'attenzione! +\begin_inset Newline newline +\end_inset + + +\size default + +\begin_inset Note Note +status open + +\begin_layout Plain Layout +Se volete cambiare licenza cambiate l'immagine e la scritta sotto +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Graphics + filename cc-by-sa.png + height 0.9cm + +\end_inset + + +\begin_inset Newline newline +\end_inset + + +\size footnotesize +Queste slides sono licenziate Creative Commons Attribution-ShareAlike 3.0 + Unported +\end_layout + +\begin_layout Standard +\align center + +\family typewriter +\begin_inset Flex URL +status open + +\begin_layout Plain Layout + +http://www.poul.org +\end_layout + +\end_inset + + +\end_layout + +\begin_layout EndFrame + +\end_layout + +\end_body +\end_document diff --git a/Corsi GNU Linux Avanzati/Gestione del software/cc-by-sa.png b/Corsi GNU Linux Avanzati/Gestione del software/cc-by-sa.png new file mode 100644 index 0000000..ef8a335 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione del software/cc-by-sa.png differ diff --git a/Corsi GNU Linux Avanzati/Gestione del software/poul-logo.pdf b/Corsi GNU Linux Avanzati/Gestione del software/poul-logo.pdf new file mode 100644 index 0000000..995ce06 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Gestione del software/poul-logo.pdf differ diff --git a/Corsi GNU Linux Avanzati/Init systems/css/inverse.css b/Corsi GNU Linux Avanzati/Init systems/css/inverse.css new file mode 100644 index 0000000..3134f89 --- /dev/null +++ b/Corsi GNU Linux Avanzati/Init systems/css/inverse.css @@ -0,0 +1,114 @@ +@import url(http://fonts.googleapis.com/css?family=Droid+Sans); +@import url(http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); +@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,300); +@import url(http://fonts.googleapis.com/css?family=Lato:400,300,100); + +body { + font-family: 'Droid Sans'; + font-size: 20px; +} +h1, h2, h3 { + font-family: 'Open Sans'; + font-weight: 300; + letter-spacing: -0.05em; + margin-bottom: 0.5em; +} +h1 { font-size: 4.5em; } +h2 { font-size: 2em; } +h3 { font-size: 1.6em; } +.footnote { + position: absolute; + bottom: 3em; +} +li p { line-height: 1.25em; } +.red { color: #fa0000; } +.large { font-size: 2em; } +a, a > code { + color: rgb(249, 38, 114); + text-decoration: none; +} +code { + -moz-border-radius: 5px; + -web-border-radius: 5px; + background: #e7e8e2; + border-radius: 5px; + font-size: 16px; +} +.pull-left { + float: left; + width: 47%; +} +.pull-right { + float: right; + width: 47%; +} +.pull-right ~ p { + clear: both; +} +#slideshow .slide .content code { + font-size: 0.8em; +} +#slideshow .slide .content pre code { + font-size: 0.9em; + padding: 15px; +} +.inverse { + background: #272822; + color: #777872; + text-shadow: 0 0 20px #333; +} +.inverse h1, .inverse h2 { + color: #f3f3f3; + line-height: 0.8em; +} + +/* Slide-specific styling */ +#slide-inverse .footnote { + bottom: 12px; + left: 20px; +} +#slide-how .slides { + font-size: 0.9em; + position: absolute; + top: 151px; + right: 140px; +} +#slide-how .slides h3 { + margin-top: 0.2em; +} +#slide-how .slides .first, #slide-how .slides .second { + padding: 1px 20px; + height: 90px; + width: 120px; + -moz-box-shadow: 0 0 10px #777; + -webkit-box-shadow: 0 0 10px #777; + box-shadow: 0 0 10px #777; +} +#slide-how .slides .first { + background: #fff; + position: absolute; + top: 20%; + left: 20%; + z-index: 1; +} +#slide-how .slides .second { + position: relative; + background: #fff; + z-index: 0; +} + +/* Two-column layout */ +.left-column { + color: #777; + width: 20%; + height: 92%; + float: left; +} + .left-column h2:last-of-type, .left-column h3:last-child { + color: #000; + } +.right-column { + width: 75%; + float: right; + padding-top: 1em; +} \ No newline at end of file diff --git a/Corsi GNU Linux Avanzati/Init systems/css/light.css b/Corsi GNU Linux Avanzati/Init systems/css/light.css new file mode 100644 index 0000000..9eb9096 --- /dev/null +++ b/Corsi GNU Linux Avanzati/Init systems/css/light.css @@ -0,0 +1,212 @@ +@import url(http://fonts.googleapis.com/css?family=Droid+Sans); +@import url(http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); +@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,300); +@import url(http://fonts.googleapis.com/css?family=Lato:400,300,100); + +body { + font-family: 'Open Sans'; + font-size: 20px; + font-weight: 300; +} +h1, h2, h3, h4 { + font-family: 'Open Sans'; + font-weight: 300; + letter-spacing: -0.05em; + margin-bottom: 0.5em; +} +h1 { font-size: 4.5em; } +h2 { font-size: 2em; } +h3 { font-size: 1.6em; } +h4 { font-size: 1.2em; } +li{ + list-style-type: square; +} +li p { line-height: 1.25em; } +.red { color: #fa0000; } +.large { font-size: 2em; } +a, a > code { + color: #0099CF; + text-decoration: none; +} +code { + float:left; + -moz-border-radius: 5px; + -web-border-radius: 5px; + background: #e7e8e2; + border-radius: 5px; + font-size: 15px; + width: 80%; + margin-left: 10%; +} +.pull-left { + float: left; + width: 52%; + margin-left: 3em; +} +.pull-right { + float: right; + width: 40%; +} +.pull-top{ + position: absolute; + top: 6em; + left: 50%; +} +.pull-right ~ p { + clear: both; +} +.text-left { + float: left; + width: 90%; + margin-left: 6em; +} +#slideshow .slide .content code { + font-size: 0.8em; +} +#slideshow .slide .content pre code { + font-size: 0.9em; + padding: 15px; +} +.light { + background: #f3f3f3; + color: #272822; + text-shadow: 0 0 0.3em #999; +} +.light h1, .light h2 { + color: #272822; + line-height: 0.8em; +} + + +/* Title-text layout */ +.title { + width: 100%; + float: left; +} + +.text{ + color: #777; + width: calc(100% - 2.5em); + float: left; + padding-top: 0; + margin: 0; +} +.text h3{ + margin-top: 0.5em; + padding-left: 2em; +} +.text h4{ + margin-top: 0.5em; + padding-left: 4em; +} +.text:last-of-type, .text:last-child { + color: #000; +} +.footnote { + position: absolute; + bottom: 4em; + left: 3em; + font-weight: 400; + width: calc(100% - 5em); + letter-spacing: -0.05em; +} +.center{ + text-align: center; +} +.little{ + font-size: 0.8em; + margin-left: 1em; +} +.sign { + position: absolute; + bottom: 0; + left: 0; + padding: 0.5em; + width: 100%; + background: #f3f3f3; + font-weight: 400; +} +.course { + position: absolute; + bottom: 0.5em; + left: 50%; + font-weight: 400; +} + +.course-right { + position: absolute; + bottom: 0.5em; + right: 0.5em; + font-weight: 400; +} + + +/* Five random image positions. */ +.center-rand1{ + text-align: center; + position: absolute; + top: 15%; + left: -1%; +} +.center-rand2{ + text-align: center; + position: absolute; + top: 21%; + left: 5%; +} +.center-rand3{ + text-align: center; + position: absolute; + top: 14%; + left: 0%; +} +.center-rand4{ + text-align: center; + position: absolute; + top: 19%; + left: 20%; +} +.center-rand5{ + text-align: center; + position: absolute; + top: 16%; + left: 10%; +} + +/*Four bricks for stacked visualizations*/ +.brick1{ + text-align: center; + background-color: #aaeeff; + height: 5em; + width: 60%; + margin-left: 20%; + border: 1px solid grey; + display: block; +} +.brick2{ + text-align: center; + background-color: #FFEE88; + height: 5em; + width: 70%; + margin-left: 15%; + border: 1px solid grey; + display: block; +} +.brick3{ + text-align: center; + background-color: #88FF88; + height: 5em; + width: 74%; + margin-left: 13%; + border: 1px solid grey; + display: block; +} +.brick4{ + text-align: center; + background-color: #FF8888; + height: 5em; + width: 80%; + margin-left: 10%; + border: 1px solid grey; + display: block; +} \ No newline at end of file diff --git a/Corsi GNU Linux Avanzati/Init systems/css/progressjs.min.css b/Corsi GNU Linux Avanzati/Init systems/css/progressjs.min.css new file mode 100755 index 0000000..12ccd82 --- /dev/null +++ b/Corsi GNU Linux Avanzati/Init systems/css/progressjs.min.css @@ -0,0 +1,176 @@ +.progressjs-inner{ + width:0 +} + +.progressjs-progress{ + z-index:9999999 +} + +.progressjs-theme-blue .progressjs-inner{ + height:0.5em; + -webkit-transition:all .3s ease-out; + -moz-transition:all .3s ease-out; + -o-transition:all .3s ease-out; + transition:all .3s ease-out; + background-color:#3498db +} + +.progressjs-theme-blue.progressjs-end{ + -webkit-transition:opacity .2s ease-out; + -moz-transition:opacity .2s ease-out; + -o-transition:opacity .2s ease-out; + transition:opacity .2s ease-out; + opacity:0 +} + +.progressjs-theme-blue .progressjs-percent{ + display:none +} + +.progressjs-theme-blueOverlay{ + background-color:white; + -webkit-transition:all .2s ease-out; + -moz-transition:all .2s ease-out; + -o-transition:all .2s ease-out; + transition:all .2s ease-out +} + +.progressjs-theme-blueOverlay .progressjs-inner{ + height:100%; + -webkit-transition:all .3s ease-out; + -moz-transition:all .3s ease-out; + -o-transition:all .3s ease-out; + transition:all .3s ease-out; + background-color:#3498db +} + +.progressjs-theme-blueOverlay.progressjs-end{ + opacity:0!important +} + +.progressjs-theme-blueOverlay .progressjs-percent{ + display:none +} + .progressjs-theme-blueOverlay{ + background-color:white; + -webkit-transition:all .2s ease-out; + -moz-transition:all .2s ease-out; + -o-transition:all .2s ease-out; + transition:all .2s ease-out + } + .progressjs-theme-blueOverlay .progressjs-inner{ + height:100%; + -webkit-transition:all .3s ease-out; + -moz-transition:all .3s ease-out; + -o-transition:all .3s ease-out; + transition:all .3s ease-out; + background-color:#3498db + } + .progressjs-theme-blueOverlay.progressjs-end{ + opacity:0!important + } + .progressjs-theme-blueOverlay .progressjs-percent{ + display:none + } + .progressjs-theme-blueOverlayRadius{ + background-color:white; + -webkit-transition:all .2s ease-out; + -moz-transition:all .2s ease-out; + -o-transition:all .2s ease-out; + transition:all .2s ease-out; + border-radius:5px + } + .progressjs-theme-blueOverlayRadius .progressjs-inner{ + height:100%; + -webkit-transition:all .3s ease-out; + -moz-transition:all .3s ease-out; + -o-transition:all .3s ease-out; + transition:all .3s ease-out; + background-color:#3498db; + border-radius:5px + } + .progressjs-theme-blueOverlayRadius.progressjs-end{ + opacity:0!important + } + .progressjs-theme-blueOverlayRadius .progressjs-percent{ + display:none + } + .progressjs-theme-blueOverlayRadiusHalfOpacity{ + background-color:white; + opacity:.5; + -webkit-transition:all .2s ease-out; + -moz-transition:all .2s ease-out; + -o-transition:all .2s ease-out; + transition:all .2s ease-out; + border-radius:5px + } + .progressjs-theme-blueOverlayRadiusHalfOpacity .progressjs-inner{ + height:100%; + -webkit-transition:all .3s ease-out; + -moz-transition:all .3s ease-out; + -o-transition:all .3s ease-out; + transition:all .3s ease-out; + background-color:#3498db; + border-radius:5px + } + .progressjs-theme-blueOverlayRadiusHalfOpacity.progressjs-end{ + opacity:0!important + } + .progressjs-theme-blueOverlayRadiusHalfOpacity .progressjs-percent{ + display:none + } + .progressjs-theme-blueOverlayRadiusWithPercentBar{ + background-color:white; + -webkit-transition:all .2s ease-out; + -moz-transition:all .2s ease-out; + -o-transition:all .2s ease-out; + transition:all .2s ease-out; + border-radius:5px + } + .progressjs-theme-blueOverlayRadiusWithPercentBar .progressjs-inner{ + height:100%; + -webkit-transition:all .3s ease-out; + -moz-transition:all .3s ease-out; + -o-transition:all .3s ease-out; + transition:all .3s ease-out; + background-color:#3498db; + border-radius:5px + } + .progressjs-theme-blueOverlayRadiusWithPercentBar.progressjs-end{ + opacity:0!important + } + .progressjs-theme-blueOverlayRadiusWithPercentBar .progressjs-percent{ + width:70px; + text-align:center; + height:40px; + position:absolute; + right:50%; + margin-right:-35px; + top:50%; + margin-top:-20px; + font-size:30px; + opacity:.5 + } + .progressjs-theme-blackRadiusInputs{ + height:10px; + border-radius:10px; + overflow:hidden + } + .progressjs-theme-blackRadiusInputs .progressjs-inner{ + height:2px; + -webkit-transition:all 1s ease-out; + -moz-transition:all 1s ease-out; + -o-transition:all 1s ease-out; + transition:all 1s ease-out; + background-color:#34495e + } + .progressjs-theme-blackRadiusInputs.progressjs-end{ + -webkit-transition:opacity .2s ease-out; + -moz-transition:opacity .2s ease-out; + -o-transition:opacity .2s ease-out; + transition:opacity .2s ease-out; + opacity:0 + } + .progressjs-theme-blackRadiusInputs .progressjs-percent{ + display:none + } diff --git a/Corsi GNU Linux Avanzati/Init systems/img/SAMPLE-SLIDES.168-e1308532399731.jpg b/Corsi GNU Linux Avanzati/Init systems/img/SAMPLE-SLIDES.168-e1308532399731.jpg new file mode 100644 index 0000000..62041de Binary files /dev/null and b/Corsi GNU Linux Avanzati/Init systems/img/SAMPLE-SLIDES.168-e1308532399731.jpg differ diff --git a/Corsi GNU Linux Avanzati/Init systems/img/brace.jpg b/Corsi GNU Linux Avanzati/Init systems/img/brace.jpg new file mode 100644 index 0000000..cc875a0 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Init systems/img/brace.jpg differ diff --git a/Corsi GNU Linux Avanzati/Init systems/img/ccbysa.png b/Corsi GNU Linux Avanzati/Init systems/img/ccbysa.png new file mode 100644 index 0000000..ef8a335 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Init systems/img/ccbysa.png differ diff --git a/Corsi GNU Linux Avanzati/Init systems/img/getty.png b/Corsi GNU Linux Avanzati/Init systems/img/getty.png new file mode 100644 index 0000000..6cfda15 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Init systems/img/getty.png differ diff --git a/Corsi GNU Linux Avanzati/Init systems/img/initfork.png b/Corsi GNU Linux Avanzati/Init systems/img/initfork.png new file mode 100644 index 0000000..1f10d94 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Init systems/img/initfork.png differ diff --git a/Corsi GNU Linux Avanzati/Init systems/img/initstart.png b/Corsi GNU Linux Avanzati/Init systems/img/initstart.png new file mode 100644 index 0000000..223de8c Binary files /dev/null and b/Corsi GNU Linux Avanzati/Init systems/img/initstart.png differ diff --git a/Corsi GNU Linux Avanzati/Init systems/img/initstop.png b/Corsi GNU Linux Avanzati/Init systems/img/initstop.png new file mode 100644 index 0000000..1bdaaa8 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Init systems/img/initstop.png differ diff --git a/Corsi GNU Linux Avanzati/Init systems/img/kernelpanic.jpg b/Corsi GNU Linux Avanzati/Init systems/img/kernelpanic.jpg new file mode 100644 index 0000000..bbadeae Binary files /dev/null and b/Corsi GNU Linux Avanzati/Init systems/img/kernelpanic.jpg differ diff --git a/Corsi GNU Linux Avanzati/Init systems/img/panic-kernel.gif b/Corsi GNU Linux Avanzati/Init systems/img/panic-kernel.gif new file mode 100644 index 0000000..78d3f17 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Init systems/img/panic-kernel.gif differ diff --git a/Corsi GNU Linux Avanzati/Init systems/img/parallelization.png b/Corsi GNU Linux Avanzati/Init systems/img/parallelization.png new file mode 100644 index 0000000..35aaba6 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Init systems/img/parallelization.png differ diff --git a/Corsi GNU Linux Avanzati/Init systems/img/poul.logo.png b/Corsi GNU Linux Avanzati/Init systems/img/poul.logo.png new file mode 100644 index 0000000..eeafd9a Binary files /dev/null and b/Corsi GNU Linux Avanzati/Init systems/img/poul.logo.png differ diff --git a/Corsi GNU Linux Avanzati/Init systems/img/stanzas.png b/Corsi GNU Linux Avanzati/Init systems/img/stanzas.png new file mode 100644 index 0000000..f3dabe2 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Init systems/img/stanzas.png differ diff --git a/Corsi GNU Linux Avanzati/Init systems/img/stanzas2.png b/Corsi GNU Linux Avanzati/Init systems/img/stanzas2.png new file mode 100644 index 0000000..3337757 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Init systems/img/stanzas2.png differ diff --git a/Corsi GNU Linux Avanzati/Init systems/img/success.jpg b/Corsi GNU Linux Avanzati/Init systems/img/success.jpg new file mode 100644 index 0000000..59498b3 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Init systems/img/success.jpg differ diff --git a/Corsi GNU Linux Avanzati/Init systems/img/sysd1.jpg b/Corsi GNU Linux Avanzati/Init systems/img/sysd1.jpg new file mode 100644 index 0000000..c1a821b Binary files /dev/null and b/Corsi GNU Linux Avanzati/Init systems/img/sysd1.jpg differ diff --git a/Corsi GNU Linux Avanzati/Init systems/img/sysd2.jpg b/Corsi GNU Linux Avanzati/Init systems/img/sysd2.jpg new file mode 100644 index 0000000..f2689d6 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Init systems/img/sysd2.jpg differ diff --git a/Corsi GNU Linux Avanzati/Init systems/img/upstart-states.png b/Corsi GNU Linux Avanzati/Init systems/img/upstart-states.png new file mode 100644 index 0000000..b0ab7c0 Binary files /dev/null and b/Corsi GNU Linux Avanzati/Init systems/img/upstart-states.png differ diff --git a/Corsi GNU Linux Avanzati/Init systems/img/upstart80.png b/Corsi GNU Linux Avanzati/Init systems/img/upstart80.png new file mode 100644 index 0000000..7ce938c Binary files /dev/null and b/Corsi GNU Linux Avanzati/Init systems/img/upstart80.png differ diff --git a/Corsi GNU Linux Avanzati/Init systems/init.html b/Corsi GNU Linux Avanzati/Init systems/init.html new file mode 100644 index 0000000..484405f --- /dev/null +++ b/Corsi GNU Linux Avanzati/Init systems/init.html @@ -0,0 +1,718 @@ + + + + + + + Linux Init Systems + + + + + + + + + + + + diff --git a/Corsi GNU Linux Avanzati/Init systems/js/jquery-2.1.1.min.js b/Corsi GNU Linux Avanzati/Init systems/js/jquery-2.1.1.min.js new file mode 100644 index 0000000..e5ace11 --- /dev/null +++ b/Corsi GNU Linux Avanzati/Init systems/js/jquery-2.1.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b) +},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*\s*$/g,ib={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("