Red Hat NETSCAPE MANAGEMENT SYSTEM 6.0 - COMMAND-LINE Manuale Utente Pagina 6

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 60
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 5
6
actually stored this as a script named 'usage' since I use it often.
Example :
I have my Linux installed on /dev/hda1 and I have mounted my
Windows partitions as well (by default every time Linux boots). So 'df' by
default shows me the disk usage of my Linux as well as Windows
partitions. And I am only interested in the disk usage of the Linux
partitions. This is what I use :
$ df -h | grep /dev/hda1 | cut -c 41-43
This command displays the following on my machine
45%
Basically this command makes 'df' display the disk usages of all the
partitions and then extracts the lines with /dev/hda1 since I am only
interested in that. Then it cuts the characters from the 41st to the 43rd
column since they are the columns that display the usage in % , which is
what I want.
Note : In case you are not familiar with pipes (which is used in the
above command) then refer to Article No. 24
. 'cut' is another tool
available in Unix. The above usage of cut gets the the characters that
are present in the specified columns. If you are interested in knowing
how to mount you Windows partitions under Linux, please refer to Article
No. 3 .
There are a few more options that can be used with 'du' and 'df' . You
could find them in the man pages.
Vedere la pagina 5
1 2 3 4 5 6 7 8 9 10 11 ... 59 60

Commenti su questo manuale

Nessun commento