ls -al says total 8 on an empty directory

I must be getting senile. When I create a directory from the terminal,
cd into the new directory and type ls -al, the result comes back with
total 8 and then lists the current directory and the parent directory.
Where does the 8 come from?

Example:

eric@linux:~> mkdir “New Folder”
eric@linux:~> cd “New Folder”
eric@linux:~/New Folder> ls -al
total 8
drwxr-xr-x 2 eric eric 4096 2010-06-27 16:32 .
drwxr–r-- 66 eric eric 4096 2010-06-27 16:32 …

eric@linux:~/New Folder> ls -l
total 0
That works as I would expect.

I think ls -al should have shown total 2 but that is what I get for
thinking. :slight_smile:

I have searched using Google and the man pages but no luck so far.
I am using openSUSE 11.2 with KDE and using the Konsole terminal.

Thank you for any help.

Eric

The 8 is saying 8K (as in - total 8.0K), not 8 files. Try using “ls -alh” where h is saying show the size in “human readable format”. I assume the 8 K is the minimum the new folder directory is using.

Thank You,

Hi
Add a h and you will see :wink:


ls -lah


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.12-0.7-default
up 2 days 7:53, 2 users, load average: 0.02, 0.04, 0.00
GPU GeForce 8600 GTS Silent - Driver Version: 256.35

On 06/27/2010 05:36 PM, jdmcdaniel3 wrote:
>
> The 8 is saying 8K (as in - total 8.0K), not 8 files. Try using “ls
> -alh” where h is saying show the size in “human readable format”. I
> assume the 8 K is the minimum the new folder directory is using.
>
> Thank You,
>
>

Thank you so much. I feel like I had a Homer Simpson moment. Doh! as I
smack my forehead. :slight_smile:

Eric

Happy to help eric. I had to look it up myself as I seldom worry about the number of files in an empty directory. lol!