LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Strange behaviour of "ls -la" (https://www.linuxquestions.org/questions/linux-newbie-8/strange-behaviour-of-ls-la-434191/)

halturata 04-11-2006 03:14 PM

Strange behaviour of "ls -la"
 
Hi there,

While I was browsing around my computer I discovered soem dirs that does not contain anything (at least according to "ls -la"). Well, what is that "total x" in the output then?!
Code:

[host] /some/place/around/linux % ls -la
total 6
drwxr-sr-x  2 user    group        512 Apr 10 12:11 .
drwxrwsr-x  77 root    group      2048 Mar 21 13:43 ..

[EDIT]
I tried it also with root, the result was the same...
[/EDIT]

Komakino 04-11-2006 03:25 PM

What total x? You mean the sizes specified next to the date? They're in bytes and I'd say 512 is the size of an empty directory (. the current directory is empty) and .. is the parent directory, so your parent dir must have files totalling 2048 bytes (or 4 empty directories?).

man ls

halturata 04-11-2006 03:28 PM

The one in red, that total "x". :)

druuna 04-11-2006 03:34 PM

Hi,

Do a ls -lah, shows sizes in K bytes, and yes total is the total size of all in that dir.

halturata 04-11-2006 03:45 PM

i got it... total 6K in directory... heh, wasn't easy though :)
Thank you guys.

Komakino 04-12-2006 04:36 AM

Quote:

Originally Posted by halturata
The one in red, that total "x". :)

Ya know, I looked all over that post and couldn't see it...!


All times are GMT -5. The time now is 08:50 AM.