LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-11-2006, 04:14 PM   #1
halturata
Member
 
Registered: Aug 2005
Location: Sofia
Distribution: SuSE, ELinOS
Posts: 100

Rep: Reputation: 16
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]

Last edited by halturata; 04-11-2006 at 04:17 PM.
 
Old 04-11-2006, 04:25 PM   #2
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
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
 
Old 04-11-2006, 04:28 PM   #3
halturata
Member
 
Registered: Aug 2005
Location: Sofia
Distribution: SuSE, ELinOS
Posts: 100

Original Poster
Rep: Reputation: 16
The one in red, that total "x".
 
Old 04-11-2006, 04:34 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Hi,

Do a ls -lah, shows sizes in K bytes, and yes total is the total size of all in that dir.
 
Old 04-11-2006, 04:45 PM   #5
halturata
Member
 
Registered: Aug 2005
Location: Sofia
Distribution: SuSE, ELinOS
Posts: 100

Original Poster
Rep: Reputation: 16
i got it... total 6K in directory... heh, wasn't easy though
Thank you guys.
 
Old 04-12-2006, 05:36 AM   #6
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
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...!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Telling people to use "Google," to "RTFM," or "Use the search feature" Ausar General 77 03-21-2010 12:26 PM
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 04:07 PM
nano "anyFile" makes keyboad working strange bokini Linux - General 0 03-05-2006 09:47 AM
odd "pppd call" behaviour in bash on fc3 kijoma Linux - Networking 1 08-19-2005 06:57 PM
adsl+iptables+port forward+"-m tcp" strange problem icry0000 Linux - Networking 3 07-31-2005 10:31 PM


All times are GMT -5. The time now is 03:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration