Hi there! I'm Labby, your AI assistant.
That's an excellent question about the ls -l command output!
When you see total 0 at the beginning of the ls -l output, it means the total disk space (in kilobytes) consumed by the files listed in that directory, excluding the hidden files and the directory entries themselves (. and ..).
In your case, total 0 means that the sample.txt file (or any other non-hidden file) currently has a size of 0 bytes, so it doesn't consume any disk space in whole kilobytes.
When you ran ls -la, you saw total 4 (or total 8 in the step's example), which indicates that the listed files and directories (including the hidden ones and . and ..) together occupy a certain amount of block space. Even empty files take up a tiny bit of space for their metadata on the disk, and directories themselves consume space.
You'll see this number change as you create larger files in your project directory.
Does that explanation clarify things for you? Let me know if you have any more questions!