How far can i trust "ls -l"?

From: Bernt Christandl <beb_at_rosat.mpe-garching.mpg.de>
Date: Mon, 05 Feb 1996 15:03:17 +0100

Dear managers,

obviously i have a problem to understand the output of "ls -l"
in the field where it outputs the size (?) of a file.

Try as an example: "ls -l /var/adm/crash/"
(This is only useful if there really is a crash-log... ;-)

On one of my machines i have

   <o08:root:c> /var/adm/crash # ls -l
   total 53012
   -rw-r--r-- 1 root system 2 Feb 3 14:17 bounds
   -rw-r--r-- 1 root system 58364 Nov 27 14:29 crash-data.0
   -rw-r--r-- 1 root system 41499 Nov 27 17:42 crash-data.1
   -rw-r--r-- 1 root system 49471 Nov 30 15:10 crash-data.2
   -rw-r--r-- 1 root system 55153 Feb 2 21:09 crash-data.3
   -rw-r--r-- 1 root system 34593 Feb 3 14:19 crash-data.4
   -rw-r----- 1 root system 536862720 Feb 3 14:17 vmcore.4
   -rw-r----- 1 root system 10038224 Feb 3 14:17 vmunix.4
   <o08:root:c> /var/adm/crash #

As you can see the "vmcore.4" claims to be as big as about 512 MB
(which is the size of the memory of that machine), but the summary in
the upper left corner only says that there are about 53 MB in this directory...
That is the *real* value of usage. If i delete that vmcore.4 it frees
only about 53 MB.

I have at least 2 completely different other examples, where "ls -l"
gives such confusing output (where the "sum" is less than the sum of the
file-sizes).

So, what does "ls -l" *really* show and how can i use "ls" to tell me about
the same quality/thing as "du", "df" or its own "sum"?

Thank you!

Bernt Christandl
                                                                       
-------------------------------------------------------------------------
- Bernt Christandl / Max Planck Institut fuer Extraterrestrische Physik -
- D-85740 Garching / Phone: +49/89/3299-3346 / Fax: +49/89/3299-3569 -
- Internet: beb_at_mpe-garching.mpg.de -
-------------------------------------------------------------------------
Received on Mon Feb 05 1996 - 15:25:00 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT