1

Have a look at this screenshot:

Terminal Commands

$ mkdir someDir
$ cd someDir
$ ls -l
total 0
$ touch someFile
$ ls -l
total 8
-rw-rw-r-- 1 user user 0 Nov 5 01:29 someFile

Pardon for my language used when I installed Ubuntu. Anyways, it is beyond my imagination how come creating an empty file actually creates eight files, alas, the extra seven won't be listed more than have their saying in the statistics. The total column clearly says eight. I'm using Ubuntu 12.10 x86. Also, in my Nautilus file explorer, I have checked the option to view hidden and system files. Maneuvering to the new someDir directory won't show more than just one file, the someFile file. So is the total count lying in my face or are there even more hidden files than the "ordinary" hidden files? I'm keen to know exactly what files gets created here, why so, and how come I can't list them.

As a side note, adding the sudo prefix to the ls -l command won't make any difference for me.

Thank you so much in advance.

muru
  • 207,228

1 Answers1

3

From ls Man Page for OSX (i expect its the same on linux, but i dont have 1 handy to test atm)

-l (The lowercase letter ``ell''.) List in long format. (See below.) If the output is to a terminal, a total sum for all the file sizes is output on a line before the long listing.

So the number is the sum of file size, and not a count of number of files.

Karthik T
  • 2,116