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

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 60
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 4
5
The first line would be the default last line of the 'du' output indicating
the total size of the directory and another line displaying the same size,
followed by the string 'total'. This is helpful in case you this command
along with the grep command to only display the final total size of a
directory as shown below.
$ du -ch | grep total
This would have only one line in its output that displays the total size of
the current directory including all the subdirectories.
Note : In case you are not familiar with pipes (which makes the above command possible) refer
to Article No. 24 . Also grep is one of the most important commands in Unix. Refer to Article No.
25 to know more about grep.
$ du -s
This displays a summary of the directory size. It is the simplest way to
know the total size of the current directory.
$ du -S
This would display the size of the current directory excluding the size of
the subdirectories that exist within that directory. So it basically shows
you the total size of all the files that exist in the current directory.
$ du --exculde=mp3
The above command would display the size of the current directory along
with all its subdirectories, but it would exclude all the files having the
given pattern present in their filenames. Thus in the above case if there
happens to be any mp3 files within the current directory or any of its
subdirectories, their size would not be included while calculating the total
directory size.
-
'df' - finding the disk free space / disk usage
$ df
Typing the above, outputs a table consisting of 6 columns. All the
columns are very easy to understand. Remember that the 'Size', 'Used'
and 'Avail' columns use kilobytes as the unit. The 'Use%' column shows
the usage as a percentage which is also very useful.
$ df -h
Displays the same output as the previous command but the '-h' indicates
human readable format. Hence instead of kilobytes as the unit the
output would have 'M' for Megabytes and 'G' for Gigabytes.
Most of the users don't use the other parameters that can be passed to
'df'. So I shall not be discussing them.
I shall in turn show you an example that I use on my machine. I have
Vedere la pagina 4
1 2 3 4 5 6 7 8 9 10 ... 59 60

Commenti su questo manuale

Nessun commento