aboutsummaryrefslogblamecommitdiff
path: root/it_IT.ISO8859-15/books/unix-introduction/system-resource/chapter.xml
blob: 96137155638ba906baadee8763d0d057c7abd052 (plain) (tree)
1
                                            

















                                                           
                                   





































                                                                               
                                                                       














































                                                                               
                                                                      








































                                                                               
                                                                    












                                                                            
                                     





































                                                                      
                                                                        










                                                                        
                                     













































                                                                          
                                                                 











                                                                             
                                   
 
                                   














































































                                                                                
                                                                 
































                                                                               
                                     


















                                                                               
                                                               
                                                                                
                                                     







                                                                   
                                                              








































                                                                            
                                     





































                                                                                     
                                                                      
                                                                      
                                                                     















                                                                              
                                                                  















                                                                               
                                                              











                                                                             
                                     










                                                     
                                                                     


                                                                        
                                                                    
























































                                                                              
                                                            









                                                                
                                   





































































































                                                                                 
                                                                 


                                      
                                 










































                                                                               
                                                                               











                                                                               

                                                                     













                                                              
                                     
 
                                     





















































































                                                                                    
                                                                       














                                                                
                                     
 
                                     
 
                                     

























































































                                                                                    
                                   
 
                                   
 
                                   


















































                                                                                    
                                                                         
                                                                            
                                                                 











                                                                          
                                   






































































































                                                                                       
<?xml version="1.0" encoding="iso-8859-15"?>
<!--
     The FreeBSD Italian Documentation Project

     $FreeBSD$
-->

<chapter id="system-resource">
  <title>Risorse di sistema e stampa</title>

  <sect1 id="system-resource-">
    <title>Risorse di sistema</title>

    <para>Comandi per gestire le risorse di sistema.</para>

    <table frame="all" id="system-resource-table-commands">
      <title>Comandi per le risorse di sistema</title>

      <tgroup cols="2">
        <colspec colwidth="3.7in"/>

        <thead>
          <row>
            <entry align="center">Comando/Sintassi</entry>

            <entry align="center">Cosa fa</entry>
          </row>
        </thead>

        <tbody>
          <row>
            <entry><command>chsh</command> (<command>passwd -e/-s</command>)
                <command><replaceable>username
                login_shell</replaceable></command></entry>

            <entry>cambia la shell di login dell'utente (spesso solo attraverso
              il super-user)</entry>
          </row>

          <row>
            <entry><command>date
                [<replaceable>opzioni</replaceable>]</command></entry>

            <entry>visualizza data e ora corrente</entry>
          </row>

          <row>
            <entry><command>df [<replaceable>opzioni</replaceable>]
                [<replaceable>risorsa</replaceable>]</command></entry>

            <entry>riporta una sintesi dei blocchi del disco e degli inode
              liberi e usati</entry>
          </row>

          <row>
            <entry><command>du [<replaceable>opzioni</replaceable>]
                [<replaceable>directory o file</replaceable>]</command></entry>

            <entry>riporta la quantità di spazio di disco usato</entry>
          </row>

          <row>
            <entry><command>hostname/uname</command></entry>

            <entry>visualizza o setta (solamente super-user) il nome della
              macchina in uso</entry>
          </row>

          <row>
            <entry><command>kill [<replaceable>opzioni</replaceable>]
                [<replaceable>-SEGNALE</replaceable>]
                [<replaceable>pid#</replaceable>]
                [%<replaceable>job</replaceable>]</command></entry>

            <entry>manda un segnale al processo specificato dal numero di
              processo id (<replaceable>pid#</replaceable>) o dal numero di
              controllo del job (%<replaceable>n</replaceable>).  Il segnale di
              default termina il processo</entry>
          </row>

          <row>
            <entry><command>man [<replaceable>opzioni</replaceable>]
                <replaceable>comando</replaceable></command></entry>

            <entry>visualizza la pagina (<emphasis>man</emphasis>) del manuale
              relativa al comando specificato</entry>
          </row>

          <row>
            <entry><command>passwd
                [<replaceable>opzioni</replaceable>]</command></entry>

            <entry>setta o modifica la propria password</entry>
          </row>

          <row>
            <entry><command>ps
                [<replaceable>opzioni</replaceable>]</command></entry>

            <entry>mostra lo stato dei processi attivi</entry>
          </row>

          <row>
            <entry><command>script
                <replaceable>file</replaceable></command></entry>

            <entry>salva tutto ciò che appare sullo schermo in un file
              fino a quando viene eseguito il comando
              <command>exit</command></entry>
          </row>

          <row>
            <entry><command>stty
                [<replaceable>opzioni</replaceable>]</command></entry>

            <entry>setta o visualizza le opzioni del terminale di
              controllo</entry>
          </row>

          <row>
            <entry><command>whereis [<replaceable>opzioni</replaceable>]
                <replaceable>comando</replaceable></command></entry>

            <entry>riporta le posizioni del file binario, del sorgente e della
              pagina man relative al comando specificato</entry>
          </row>

          <row>
            <entry><command>which
                <replaceable>comando</replaceable></command></entry>

            <entry>riporta il percorso (path) del comando specificato o l'alias
              di shell in uso</entry>
          </row>

          <row>
            <entry><command>who</command> oppure <command>w</command></entry>

            <entry>riporta gli utenti <quote>loggati</quote> e i loro processi
              in esecuzione</entry>
          </row>
        </tbody>
      </tgroup>
    </table>

    <sect2 id="system-resource-df">
      <title>df - riepiloga i blocchi del disco e lo spazio usato</title>

      <para>Il comando &man.df.1; è usato per riportare il numero di
        blocchi del disco e di inode liberi e usati per ogni file system.
        Il formato dell'output e le valide opzioni sono molto specifiche dal
        sistema operativo e dalla versione del programma in uso.</para>

      <para><emphasis>Sintassi</emphasis></para>

      <para><command>df [<replaceable>opzioni</replaceable>]
          [<replaceable>risorsa</replaceable>]</command></para>

      <para><emphasis>Opzioni generali</emphasis></para>

      <informaltable frame="none">
        <tgroup cols="2">
          <colspec colwidth="0.5in"/>

          <tbody>
            <row>
              <entry><option>-l</option></entry>

              <entry>solo il file system locale (SVR4)</entry>
            </row>

            <row>
              <entry><option>-k</option></entry>

              <entry>riporta in kilobyte (SVR4)</entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>

      <para><emphasis>Esempi:</emphasis></para>

      <screen>{Unix prompt 1} <userinput>df</userinput>
Filesystem      kbytes  used    avail   capacity  Mounted on

/dev/sd0a       20895   19224   0       102%      /
/dev/sd0h       319055  131293  155857  46%       /usr
/dev/sd1g       637726  348809  225145  61%       /usr/local
/dev/sd1a       240111  165489  50611   77%       /home/guardian
peri:/usr/local/backup
                1952573 976558  780758  56%       /usr/local/backup
peri:/home/peri 726884  391189  263007  60%       /home/peri
peri:/usr/spool/mail
                192383  1081    172064  1%        /var/spool/mail
peri:/acs/peri/2
                723934  521604  129937  80%       /acs/peri/2</screen>
    </sect2>

    <sect2 id="system-resource-du">
      <title>du - mostra lo spazio del disco usato</title>

      <para>Il comando &man.du.1; riporta la quantità di spazio di disco
        usato per i file o per le directory specificate.</para>

      <para><emphasis>Sintassi</emphasis></para>

      <para><command>du [<replaceable>opzioni</replaceable>]
          [<replaceable>directory o file</replaceable>]</command></para>

      <para><emphasis>Opzioni generali</emphasis></para>

      <informaltable frame="none">
        <tgroup cols="2">
          <colspec colwidth="0.5in"/>

          <tbody>
            <row>
              <entry><option>-a</option></entry>

              <entry>mostra l'uso del disco per ogni file, non solo per le
                sotto-directory</entry>
            </row>

            <row>
              <entry><option>-s</option></entry>

              <entry>mostra solo la somma totale</entry>
            </row>

            <row>
              <entry><option>-k</option></entry>

              <entry>riporta in kilobyte (SVR4)</entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>

      <para><emphasis>Esempi:</emphasis></para>

      <screen>{Unix prompt 3} <userinput>du</userinput>
 1 ./.elm
 1 ./Mail
 1 ./News
20 ./uc
86 .</screen>

      <screen>{Unix prompt 4} <userinput>du -a uc</userinput>
7 uc/Unixgrep.txt
5 uc/editors.txt
1 uc/.emacs
1 uc/.exrc
4 uc/telnet.ftp
1 uc/uniq.tee.txt
20 uc</screen>
    </sect2>

    <sect2 id="system-resource-ps">
      <title>ps - mostra lo stato dei processi attivi</title>

      <para>Il comando &man.ps.1; è usato per mostrare i processi
        correntemente eseguiti sul sistema.  Il formato dell'output e le
        valide opzioni dipendono molto dal sistema operativo e dalla versione
        del programma in uso.</para>

      <para><emphasis>Sintassi</emphasis></para>

      <para><command>ps [<replaceable>opzioni</replaceable>]</command></para>

      <para><emphasis>Opzioni generali</emphasis></para>

      <informaltable frame="none">
        <tgroup cols="3">
          <colspec colwidth="1in"/>

          <colspec colwidth="1in"/>

          <thead>
            <row>
              <entry>BSD</entry>

              <entry>SVR4</entry>
            </row>
          </thead>

          <tbody>
            <row>
              <entry><option>-a</option></entry>

              <entry><option>-e</option></entry>

              <entry>tutti i processi di tutti gli utenti</entry>
            </row>

            <row>
              <entry><option>-e</option></entry>

              <entry></entry>

              <entry>ambiente di esecuzione</entry>
            </row>

            <row>
              <entry><option>-g</option></entry>

              <entry></entry>

              <entry>processi del gruppo amministrativo come
                <groupname>well</groupname></entry>
            </row>

            <row>
              <entry><option>-l</option></entry>

              <entry><option>-l</option></entry>

              <entry>formato lungo</entry>
            </row>

            <row>
              <entry><option>-u</option></entry>

              <entry><option>-u <replaceable>user</replaceable></option></entry>

              <entry>relazione specifica di un utente</entry>
            </row>

            <row>
              <entry><option>-x</option></entry>

              <entry><option>-e</option></entry>

              <entry>anche i processi non eseguiti da terminali</entry>
            </row>

            <row>
              <entry></entry>

              <entry><option>-f</option></entry>

              <entry>lista completa</entry>
            </row>

            <row>
              <entry><option>-w</option></entry>

              <entry></entry>

              <entry>riporta i primi 132 caratteri per linea</entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>

      <note>
        <para>Poichè il comando &man.ps.1; è molto dipendente dal
          sistema, si raccomanda di consultare le <emphasis>pagine
          man</emphasis> del proprio sistema per i dettagli delle opzioni e per
          l'interpretazione dell'output di &man.ps.1;.</para>
      </note>

      <para><emphasis>Esempi:</emphasis></para>

      <screen>{Unix prompt 5} <userinput>ps</userinput>
PID     TT      STAT    TIME    COMMAND
15549   p0      IW      0:00    -tcsh (tcsh)
15588   p0      IW      0:00    man nice
15594   p0      IW      0:00    sh -c less /tmp/man15588
15595   p0      IW      0:00    less /tmp/man15588
15486   p1      S       0:00    -tcsh (tcsh)
15599   p1      T       0:00    emacs Unixgrep.txt
15600   p1      R       0:00    ps</screen>
    </sect2>

    <sect2 id="system-resource-kill">
      <title>kill - termina un processo</title>

      <para>Il comando &man.kill.1; manda un segnale a un processo,
        generalmente per terminarlo.</para>

      <para><emphasis>Sintassi</emphasis></para>

      <para><command>kill [<replaceable>-SEGNALE</replaceable>]
          <replaceable>id-processo</replaceable></command></para>

      <para><emphasis>Opzioni generali</emphasis></para>

      <informaltable frame="none">
        <tgroup cols="2">
          <colspec colwidth="0.5in"/>

          <tbody>
            <row>
              <entry><option>-l</option></entry>

              <entry>visualizza i segnali disponibili per kill</entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>

      <para><emphasis>Esempi:</emphasis></para>

      <screen>{Unix prompt 9} <userinput>kill -l</userinput>
HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM URG STOP
TSTP CONT CHLD TTIN TTOU IO XCPU XFSZ VTALRM PROF WINCH LOST USR1 USR2</screen>

      <para>Il segnale <option>-KILL</option>, anche specificato con
        <option>-9</option> (a causa della nona posizione assunta nella lista
        precedente), è il maggior segnale comunemente usato con
        &man.kill.1;.  A differenza di altri segnali, questo, una volta captato,
        non può essere ignorato dal programma.</para>

      <screen>{Unix prompt 10} <userinput>kill -9 15599</userinput>
[1] + Killed emacs Unixgrep.txt</screen>
    </sect2>

    <sect2 id="system-resource-who">
      <title>who - mostra gli utenti attuali</title>

      <para>Il comando &man.who.1; riporta chi è correntemente
        <quote>loggato</quote> nel sistema.</para>

      <para><emphasis>Sintassi</emphasis></para>

      <para><command>who [<option>am i</option>]</command></para>

      <para><emphasis>Esempi:</emphasis></para>

      <screen>beauty condron&gt; <userinput>who</userinput>
wmtell          ttyp1 Apr 21 20:15 (apple.acs.ohio-s)
fbwalk          ttyp2 Apr 21 23:21 (worf.acs.ohio-st)
stwang          ttyp3 Apr 21 23:22 (127.99.25.8)
david           ttyp4 Apr 21 22:27 (slip1-61.acs.ohi)
tgardner        ttyp5 Apr 21 23:07 (picard.acs.ohio-)
awallace        ttyp6 Apr 21 23:00 (ts31-4.homenet.o)
gtl27           ttyp7 Apr 21 23:24 (data.acs.ohio-st)
ccchang         ttyp8 Apr 21 23:32 (slip3-10.acs.ohi)
condron         ttypc Apr 21 23:38 (lcondron-mac.acs)
dgildman        ttype Apr 21 22:30 (slip3-36.acs.ohi)
fcbetz          ttyq2 Apr 21 21:12 (ts24-10.homenet.)</screen>

      <screen>beauty condron&gt; <userinput>who am i</userinput>
beauty!condron ttypc Apr 21 23:38 (lcondron-mac.acs)</screen>
    </sect2>

    <sect2 id="system-resource-whereis">
      <title>whereis - riporta le locazioni del programma</title>

      <para>Il comando &man.whereis.1; riporta le locazioni del file
        sorgente, di quello binario e del file delle pagine man associate al
        comando.</para>

      <para><emphasis>Sintassi</emphasis></para>

      <para><command>whereis [<replaceable>opzioni</replaceable>]
          <replaceable>comando</replaceable></command></para>

      <para><emphasis>Opzioni generali</emphasis></para>

      <informaltable frame="none">
        <tgroup cols="2">
          <colspec colwidth="0.5in"/>

          <tbody>
            <row>
              <entry><option>-b</option></entry>

              <entry>riporta solamente i file binari</entry>
            </row>

            <row>
              <entry><option>-m</option></entry>

              <entry>riporta solamente la sezione manuale</entry>
            </row>

            <row>
              <entry><option>-s</option></entry>

              <entry>riporta solamente i file sorgenti</entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>

      <para><emphasis>Esempi:</emphasis></para>

      <screen>brigadier: condron [69]&gt; <userinput>whereis Mail</userinput>
Mail: /usr/ucb/Mail /usr/lib/Mail.help /usr/lib/Mail.rc /usr/man/man1/Mail.1</screen>

      <screen>brigadier: condron [70]&gt; <userinput>whereis -b Mail</userinput>
Mail: /usr/ucb/Mail /usr/lib/Mail.help /usr/lib/Mail.rc</screen>

      <screen>brigadier: condron [71]&gt; <userinput>whereis -m Mail</userinput>
Mail: /usr/man/man1/Mail.1</screen>
    </sect2>

    <sect2 id="system-resource-which">
      <title>which - riporta il comando trovato</title>

      <para>Il comando &man.which.1; riporta il nome del file che sarà
        eseguito quando il comando specificato viene invocato.  Questo
        può essere un path name assoluto o il primo alias trovato nel
        proprio path.</para>

      <para><emphasis>Sintassi</emphasis></para>

      <para><command>which <replaceable>comando</replaceable></command></para>

      <para><emphasis>Esempi:</emphasis></para>

      <screen>brigadier: condron [73]&gt; <userinput>which Mail</userinput>
/usr/ucb/Mail</screen>
    </sect2>

    <sect2 id="system-resource-hostname-unname">
      <title>hostname/uname - nome della macchina</title>

      <para>Il comando &man.hostname.1; (<command>uname -u</command> su SysV)
        riporta il nome host della macchina nella quale l'utente è
        <quote>loggato</quote>, esempio:</para>

      <screen>brigadier: condron [91]&gt; <userinput>hostname</userinput>
brigadier</screen>

      <para>&man.uname.1; ha opzioni aggiuntive per visualizzare informazioni
        circa l'hardware del sistema e la versione del software.</para>
    </sect2>

    <sect2 id="system-resource-script">
      <title>script - memorizza la propria schermata di I/O</title>

      <para>Il comando &man.script.1; crea una documentazione della propria
        sessione di I/O.  Usando il comando &man.script.1; si possono catturare
        tutti i dati trasmessi da e per il proprio terminale visuale fino
        all'uscita (con <command>exit</command>) del programma stesso.
        Può essere utile durante un processo di debugging, per
        documentare le azioni che si stanno sperimentando o per avere una
        copia stampabile per una attenta lettura successiva.</para>

      <para><emphasis>Sintassi</emphasis></para>

      <para><command>script [<option>-a</option>]
          [<replaceable>file</replaceable>] &lt;...&gt; exit</command></para>

      <para><emphasis>Opzioni generali</emphasis></para>

      <informaltable frame="none">
        <tgroup cols="2">
          <colspec colwidth="0.5in"/>

          <tbody>
            <row>
              <entry><option>-a</option></entry>

              <entry>appende l'output al file</entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>

      <para>Di default, <filename>typescript</filename> è il nome del
        file usato dal comando &man.script.1;.</para>

      <para>Ci si deve ricordare di digitare <command>exit</command> per
        terminare la propria sessione script e chiudere così il file
        <filename>typescript</filename>.</para>

      <para><emphasis>Esempi:</emphasis></para>

      <screen>beauty condron&gt; <userinput>script</userinput>
Script started, file is typescript</screen>

      <screen>beauty condron&gt; <userinput>ps</userinput>
PID TT STAT TIME COMMAND
23323 p8 S 0:00 -h -i (tcsh)
23327 p8 R 0:00 ps
18706 pa S 0:00 -tcsh (tcsh)
23315 pa T 0:00 emacs
23321 pa S 0:00 script
23322 pa S 0:00 script
3400 pb I 0:00 -tcsh (tcsh)</screen>

      <screen>beauty condron&gt; <userinput>kill -9 23315</userinput></screen>

      <screen>beauty condron&gt; <userinput>date</userinput>
Mon Apr 22 22:29:44 EDT 1996</screen>

      <screen>beauty condron&gt; <userinput>exit</userinput>
exit
Script done, file is typescript
[1] + Killed emacs</screen>

      <screen>beauty condron&gt; <userinput>cat typescript</userinput>
Script started on Mon Apr 22 22:28:36 1996

beauty condron&gt;ps
PID TT STAT TIME COMMAND
23323 p8 S 0:00 -h -i (tcsh)
23327 p8 R 0:00 ps
18706 pa S 0:00 -tcsh (tcsh)
23315 pa T 0:00 emacs
23321 pa S 0:00 script
23322 pa S 0:00 script
3400 pb I 0:00 -tcsh (tcsh)

beauty condron&gt;kill -9 23315

beauty condron&gt;date
Mon Apr 22 22:29:44 EDT 1996

beauty condron&gt;exit
exit

script done on Mon Apr 22 22:30:02 1996</screen>

      <screen>beauty condron&gt; <userinput></userinput></screen>
    </sect2>

    <sect2 id="system-resource-date">
      <title>date - data e ora corrente</title>

      <para>Il comando &man.date.1; mostra la data e l'ora corrente.
        Un super-user può modificare la data e l'ora.</para>

      <para><emphasis>Sintassi</emphasis></para>

      <para><command>date [<replaceable>opzioni</replaceable>]
          [<replaceable>+formato</replaceable>]</command></para>

      <para><emphasis>Opzioni generali</emphasis></para>

      <informaltable frame="none">
        <tgroup cols="2">
          <colspec colwidth="1in"/>

          <tbody>
            <row>
              <entry><option>-u</option></entry>

              <entry>usa Universal Time (o Greenwich Mean Time)</entry>
            </row>

            <row>
              <entry><option>+<replaceable>formato</replaceable></option></entry>

              <entry>specifica il formato di output</entry>
            </row>

            <row>
              <entry align="center"><option>%a</option></entry>

              <entry>abbreviazione giorni, da Sabato a Domenica</entry>
            </row>

            <row>
              <entry align="center"><option>%h</option></entry>

              <entry>abbreviazione mesi, da Gennaio a Dicembre</entry>
            </row>

            <row>
              <entry align="center"><option>%j</option></entry>

              <entry>giorno dell'anno, da 001 a 366</entry>
            </row>

            <row>
              <entry align="center"><option>%n</option></entry>

              <entry>new-line</entry>
            </row>

            <row>
              <entry align="center"><option>%t</option></entry>

              <entry>tab</entry>
            </row>

            <row>
              <entry align="center"><option>%y</option></entry>

              <entry>ultime due cifre dell'anno, da 00 a 99</entry>
            </row>

            <row>
              <entry align="center"><option>%D</option></entry>

              <entry>formato data MM/DD/YY</entry>
            </row>

            <row>
              <entry align="center"><option>%H</option></entry>

              <entry>ora, da 00 a 23</entry>
            </row>

            <row>
              <entry align="center"><option>%M</option></entry>

              <entry>minuti, da 00 a 59</entry>
            </row>

            <row>
              <entry align="center"><option>%S</option></entry>

              <entry>secondi, da 00 a 59</entry>
            </row>

            <row>
              <entry align="center"><option>%T</option></entry>

              <entry>formato ora HH:MM:SS</entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>

      <para><emphasis>Esempi:</emphasis></para>

      <screen>beauty condron&gt; <userinput>date</userinput>
Mon Jun 10 09:01:05 EDT 1996</screen>

      <screen>beauty condron&gt; <userinput>date -u</userinput>
Mon Jun 10 13:01:33 GMT 1996</screen>

      <screen>beauty condron&gt; <userinput>date +%a%t%D</userinput>
Mon 06/10/96</screen>

      <screen>beauty condron&gt; <userinput>date '+%y:%j'</userinput>
96:162</screen>
    </sect2>
  </sect1>

  <sect1 id="system-resource-print">
    <title>Comandi di stampa</title>

    <table frame="all" id="system-resource-table-print-commands">
      <title>Comandi di stampa</title>

      <tgroup cols="2">
        <colspec colwidth="3in"/>

        <thead>
          <row>
            <entry align="center">Comando/Sintassi</entry>

            <entry align="center">Cosa fa</entry>
          </row>
        </thead>

        <tbody>
          <row>
            <entry><command>lpq</command> (<command>lpstat</command>)
              <command>[<replaceable>opzioni</replaceable>]</command></entry>

            <entry>mostra lo stato dei job (lavori) di stampa</entry>
          </row>

          <row>
            <entry><command>lpr</command> (<command>lp</command>)
              <command>[<replaceable>opzioni</replaceable>]
                <replaceable>file</replaceable></command></entry>

            <entry>stampa con una stampante specifica</entry>
          </row>

          <row>
            <entry><command>lprm</command> (<command>cancel</command>)
              <command>[<replaceable>opzioni</replaceable>]</command></entry>

            <entry>rimuove un job di stampa dalla coda di stampa</entry>
          </row>

          <row>
            <entry><command>pr [<replaceable>opzioni</replaceable>]
                [<replaceable>file</replaceable>]</command></entry>

            <entry>filtra il file e lo stampa sul terminale</entry>
          </row>
        </tbody>
      </tgroup>
    </table>

    <para>I comandi di stampa permettono di stampare file sullo standard output
      (&man.pr.1;) o attraverso una stampante (&man.lp.1; e &man.lpr.1;) fino a
      filtrare l'output.  I comandi di stampa di <emphasis>BSD</emphasis> e
      <emphasis>SysV</emphasis> usano diversi nomi e diverse opzioni per
      produrre lo stesso risultato: &man.lpr.1;, &man.lprm.1; e &man.lpq.1;
      contro &man.lp.1;, <command>cancel</command> e <command>lpstat</command>
      rispettivamente per BSD e SysV, sottopongono, cancellano e verificano lo
      stato di un job (lavoro) di stampa.</para>

    <sect2 id="system-resource-print-lp-lpr">
      <title>lp/lpr - sottopone un job di stampa</title>

      <para>Il comando &man.lp.1; o &man.lpr.1; sottopone il file specificato o
        lo standard input al demone di stampa per essere stampato.  Ad ogni job
        viene assegnato un unico id di richiesta che può essere usato
        in seguito per verificare o cancellare il job mentre è nella
        coda di stampa.</para>

      <para><emphasis>Sintassi</emphasis></para>

      <para><command>lp [<replaceable>opzioni</replaceable>]
          <replaceable>filename</replaceable></command></para>

      <para><command>lpr [<replaceable>opzioni</replaceable>]
          <replaceable>filename</replaceable></command></para>

      <para><emphasis>Opzioni generali</emphasis></para>

      <informaltable frame="none">
        <tgroup cols="3">
          <colspec colwidth="1.6in"/>

          <colspec colwidth="1.4in"/>

          <thead>
            <row>
              <entry>lp</entry>

              <entry>lpr</entry>

              <entry>funzione</entry>
            </row>
          </thead>

          <tbody>
            <row>
              <entry><option>-n
                  <replaceable>numero</replaceable></option></entry>

              <entry><option>-<replaceable>#numero</replaceable></option></entry>

              <entry>numero di copie</entry>
            </row>

            <row>
              <entry><option>-t
                  <replaceable>titolo</replaceable></option></entry>

              <entry><option>-T<replaceable>titolo</replaceable></option></entry>

              <entry>titolo del job</entry>
            </row>

            <row>
              <entry><option>-d
                  <replaceable>destinazione</replaceable></option></entry>

              <entry><option>-P<replaceable>stampante</replaceable></option></entry>

              <entry>nome della stampante</entry>
            </row>

            <row>
              <entry><option>-c</option></entry>

              <entry>(default)</entry>

              <entry>copia il file in coda prima di stamparlo</entry>
            </row>

            <row>
              <entry>(default)</entry>

              <entry><option>-s</option></entry>

              <entry>non copia il file in coda prima di stamparlo</entry>
            </row>

            <row>
              <entry><option>-o
                  <replaceable>opzioni</replaceable></option></entry>

              <entry></entry>

              <entry>opzioni addizionali, esempio
                <option>nobanner</option></entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>

      <para>I file che iniziano con i simboli <literal>%!</literal> sono
        considerati file contenenti comandi PostScript.</para>

      <para><emphasis>Esempi:</emphasis></para>

      <para>Per stampare il file <filename>ssh.ps</filename>:</para>

      <screen>&prompt.user; <userinput>lp ssh.ps</userinput>
request id is lp-153 (1 file(s))</screen>

      <para>Questo sottopone il job nella coda della stampante di default,
        <devicename>lp</devicename>, con l'id di richiesta
        <literal>lp-153</literal>.</para>
    </sect2>

    <sect2 id="system-resource-print-lpstat-lpq">
      <title>lpstat/lpq - verifica lo stato di un job di stampa</title>

      <para>Si può verificare lo stato del proprio job di stampa con il
        comando <command>lpstat</command> o &man.lpq.1;.</para>

      <para><emphasis>Sintassi</emphasis></para>

      <para><command>lpstat
          [<replaceable>opzioni</replaceable>]</command></para>

      <para><command>lpq [<replaceable>opzioni</replaceable>]
          [<replaceable>job#</replaceable>]
          [<replaceable>username</replaceable>]</command></para>

      <para><emphasis>Opzioni generali</emphasis></para>

      <informaltable frame="none">
        <tgroup cols="3">
          <colspec colwidth="1.5in"/>

          <colspec colwidth="1.5in"/>

          <colspec colwidth="3.5in"/>

          <thead>
            <row>
              <entry>lpstat</entry>

              <entry>lpq</entry>

              <entry>funzione</entry>
            </row>
          </thead>

          <tbody>
            <row>
              <entry><option>-d</option></entry>

              <entry>(<devicename>lp</devicename> di default)</entry>

              <entry>lista dei sistemi destinazione di default</entry>
            </row>

            <row>
              <entry><option>-s</option></entry>

              <entry></entry>

              <entry>riassume lo stato di stampa</entry>
            </row>

            <row>
              <entry><option>-t</option></entry>

              <entry></entry>

              <entry>stampa tutte le informazioni dello stato di stampa</entry>
            </row>

            <row>
              <entry><option>-u
                  [<replaceable>login-ID-list</replaceable>]</option></entry>

              <entry></entry>

              <entry>lista dell'utente specificato</entry>
            </row>

            <row>
              <entry><option>-v</option></entry>

              <entry></entry>

              <entry>elenca le stampanti conosciute dal sistema</entry>
            </row>

            <row>
              <entry><option>-p
                  <replaceable>stampante</replaceable></option></entry>

              <entry><option>-P<replaceable>stampante</replaceable></option></entry>

              <entry>stampa lo stato della stampante specificata</entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>

      <para><emphasis>Esempi:</emphasis></para>

      <screen>&prompt.user; <userinput>lpstat</userinput>
lp-153 frank 208068 Apr 29 15:14 on lp </screen>
    </sect2>

    <sect2 id="system-resource-print-cancel-lprm">
      <title>cancel/lprm - cancella un job di stampa</title>

      <para>Alcuni utenti possono cancellare solamente i loro job di
        stampa.</para>

      <para><emphasis>Sintassi</emphasis></para>

      <para><command>cancel [<replaceable>id-richiesta</replaceable>]
          [<replaceable>stampante</replaceable>]</command></para>

      <para><command>lprm [<replaceable>opzioni</replaceable>]
          [<replaceable>job#</replaceable>]
          [<replaceable>username</replaceable>]</command></para>

      <para><emphasis>Opzioni generali</emphasis></para>

      <informaltable frame="none">
        <tgroup cols="3">
          <colspec colwidth="2in"/>

          <colspec colwidth="2in"/>

          <colspec colwidth="2in"/>

          <thead>
            <row>
              <entry>cancel</entry>

              <entry>lprm</entry>

              <entry>funzione</entry>
            </row>
          </thead>

          <tbody>
            <row>
              <entry></entry>

              <entry><option>-P<replaceable>stampante</replaceable></option></entry>

              <entry>specifica la stampante</entry>
            </row>

            <row>
              <entry></entry>

              <entry><option>-</option></entry>

              <entry>tutti i job dell'utente</entry>
            </row>

            <row>
              <entry><option>-u
                  [<replaceable>login-ID-list</replaceable>]</option></entry>

              <entry></entry>

              <entry>lista dell'utente</entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>

      <para><emphasis>Esempi:</emphasis></para>

      <para>Per cancellare il job sottomesso in precedenza:</para>

      <screen>&prompt.user; <userinput>cancel lp-153</userinput></screen>
    </sect2>

    <sect2 id="system-resource-print-pr">
      <title>pr - prepara file per la stampa</title>

      <para>Il comando &man.pr.1; stampa l'intestazione e le informazioni
        traccia che circoscrivono il file formattato.  Si può specificare
        il numero di pagine da stampare, le linee per pagina, le colonne, le
        linee bianche, si può specificare la larghezza di pagina,
        l'intestazione e le informazioni traccia e in che modo trattare il
        carattere tab.</para>

      <para><emphasis>Sintassi</emphasis></para>

      <para><command>pr [<replaceable>opzioni</replaceable>]
          <replaceable>file</replaceable></command></para>

      <para><emphasis>Opzioni generali</emphasis></para>

      <informaltable frame="none">
        <tgroup cols="2">
          <colspec colwidth="2in"/>

          <tbody>
            <row>
              <entry><option>+<replaceable>numero_pagina</replaceable></option></entry>

              <entry>inizia a stampare al numero di pagina specificato</entry>
            </row>

            <row>
              <entry><option>-<replaceable>colonne</replaceable></option></entry>

              <entry>numero di colonne</entry>
            </row>

            <row>
              <entry><option>-a</option></entry>

              <entry>modifica l'opzione <replaceable>-colonne</replaceable> per
                riempire le colonne nell'ordine round-robin</entry>
            </row>

            <row>
              <entry><option>-d</option></entry>

              <entry>doppio spazio</entry>
            </row>

            <row>
              <entry><option>-e [<replaceable>carattere</replaceable>]
                  [<replaceable>gap</replaceable>]</option></entry>

              <entry>spazio tab</entry>
            </row>

            <row>
              <entry><option>-h
                  <replaceable>stringa_intestazione</replaceable></option></entry>

              <entry>intestazione per ogni pagina</entry>
            </row>

            <row>
              <entry><option>-l
                  <replaceable>linee</replaceable></option></entry>

              <entry>linee per pagina</entry>
            </row>

            <row>
              <entry><option>-t</option></entry>

              <entry>non stampa l'intestazione e la traccia per ogni
                pagina</entry>
            </row>

            <row>
              <entry><option>-w
                  <replaceable>larghezza</replaceable></option></entry>

              <entry>larghezza di pagina</entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>

      <para><emphasis>Esempi:</emphasis></para>

      <para>Il file contenente la lista di libri di P. G. Wodehouse Lord
        Emsworth dovrebbe essere stampato con 14 linee per pagina (incluse 5 di
        intestazione e 5 (vuote) linee traccia), dove l'opzione
        <option>-e</option> specifica in che modo convertire i tab:</para>

      <screen>&prompt.user; <userinput>pr -l 14 -e42 wodehouse</userinput>





Apr 29 11:11 1996 wodehouse_emsworth_books Page 1




Something Fresh [1915]                  Uncle Dynamite [1948]
Leave it to Psmith [1923]               Pigs Have Wings [1952]
Summer Lightning [1929]                 Cocktail Time [1958]
Heavy Weather [1933]                    Service with a Smile [1961]





Apr 29 11:11 1996 wodehouse_emsworth_books Page 2




Blandings Castle and Elsewhere [1935]   Galahad at Blandings [1965]
Uncle Fred in the Springtime [1939]     A Pelican at Blandings [1969]
Full Moon [1947]                        Sunset at Blandings [1977]</screen>
    </sect2>
  </sect1>
</chapter>