LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 09-27-2008, 07:30 PM   #1
JavaNinja
Member
 
Registered: Sep 2008
Posts: 90

Rep: Reputation: 15
ls gives total 8 when dir empty


Hello all,

Can some help me understand this:

Code:
[root@ip folder]# ls -lart
total 8
drwxr-xr-x 5 root root 4096 Sep 26 09:48 ..
drwxr-xr-x 2 root root 4096 Sep 26 09:48 .
I only see 2 things, what does the "total 8" mean?

Sorry for the nooby question, didn't know how to phrase this in google.

Thanks all
 
Old 09-27-2008, 09:13 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
The total isn't the count of the files listed, but the size. While there are no "files" in the traditional sense, the "../" and "./" links have a size to them so they are counted.
 
Old 09-28-2008, 11:38 AM   #3
JavaNinja
Member
 
Registered: Sep 2008
Posts: 90

Original Poster
Rep: Reputation: 15
Ah, I see. Is the size in KB?
 
Old 09-29-2008, 10:53 PM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Code:
$ ls -larth empty
total 8.0K
drwx------ 52 Peter Peter 4.0K 2008-09-29 20:50 ..
drwxrwxr-x  2 Peter Peter 4.0K 2008-09-29 20:50 .
 
Old 09-30-2008, 04:34 AM   #5
JavaNinja
Member
 
Registered: Sep 2008
Posts: 90

Original Poster
Rep: Reputation: 15
Many thanks for that.
 
  


Reply



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
Unable To Empty a Dir carlosinfl Linux - Server 3 03-07-2007 09:04 AM
rm -d non-empty dir, unlink or not? ekdya Debian 3 10-17-2005 09:59 AM
Bash Script test for empty dir uopjohnson Linux - Software 3 10-07-2005 06:45 PM
cancel shell programm is dir is empty saavik Programming 1 12-29-2003 06:23 AM
How Can I get the Total Size of a Dir w/o Recursing Into it? linuxSysProg Programming 3 08-08-2003 08:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 12:54 AM.

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
Open Source Consulting | Domain Registration