Find the answer to your Linux question:
Results 1 to 4 of 4
What does total line refers in ls -l output ?...
  1. #1
    Linux Newbie Sangal-Arun's Avatar
    Join Date
    May 2006
    Location
    Gurgaon, India + Denver Colorado USA
    Posts
    101

    Red face total in "ls -l" command ????

    What does total line refers in ls -l output ?
    Brgds,

    ARUN SANGAL
    SCM: 1- 720 251 9962
    Email: sangal.ak04@gmail.com
    Email: sangal_ak04@yahoo.com

  2. #2
    Linux Newbie Sangal-Arun's Avatar
    Join Date
    May 2006
    Location
    Gurgaon, India + Denver Colorado USA
    Posts
    101

    Question

    Code:
    [/E*Fare/Users/qabuild/aksutil/giga] $ ls -ltr
    total 24
    -rw-rw-r--  1 qabuild DENCCEFS     5 Jul 24 21:03 1
    -rw-rw-r--  1 qabuild DENCCEFS     5 Jul 24 21:03 2
    -rw-rw-r--  1 qabuild DENCCEFS 10428 Jul 24 21:28 ls-ltr
    drwxrwxr-x  2 qabuild DENCCEFS  4096 Jul 24 21:35 chand/
    drwxrwxr-x  3 qabuild DENCCEFS  4096 Jul 24 21:35 pakoda/
    drwxrwxr-x  3 qabuild DENCCEFS  4096 Jul 24 21:45 giga1/
    
    [/E*Fare/Users/qabuild/aksutil/giga] $ du -ch ls-ltr
    12K     ls-ltr
    12K     total
    
    [/E*Fare/Users/qabuild/aksutil/giga] $ ls -ltra
    total 40
    drwxrwxr-x  26 qabuild DENCCEFS 12288 Jul 24 21:03 ../
    -rw-rw-r--   1 qabuild DENCCEFS     5 Jul 24 21:03 1
    -rw-rw-r--   1 qabuild DENCCEFS     5 Jul 24 21:03 2
    -rw-rw-r--   1 qabuild DENCCEFS 10428 Jul 24 21:28 ls-ltr
    drwxrwxr-x   2 qabuild DENCCEFS  4096 Jul 24 21:35 chand/
    drwxrwxr-x   3 qabuild DENCCEFS  4096 Jul 24 21:35 pakoda/
    drwxrwxr-x   3 qabuild DENCCEFS  4096 Jul 24 21:45 giga1/
    drwxrwxr-x   5 qabuild DENCCEFS  4096 Jul 24 21:51 ./
    
    [/E*Fare/Users/qabuild/aksutil/giga] $

    total in first case is 24...which is 4 for chand folder, 4 for pakoda folder, 4 for giga1 folder and 12 for ls-ltr file (note: 10428 bytes of file will not fit in 4+4 KB of 2 blocks that's why 3 blocks of 4 KB) i.e. 12 KB.

    Thus, 12, 4+4+4= 24.

    now, how come it's reflecting 40 ???? with "a" option with ls command.
    Brgds,

    ARUN SANGAL
    SCM: 1- 720 251 9962
    Email: sangal.ak04@gmail.com
    Email: sangal_ak04@yahoo.com

  3. #3
    Linux User
    Join Date
    May 2008
    Location
    NYC, moved from KS & MO
    Posts
    251
    ls -la lists files (including directories) names that start with . (dot) while ls -l does not.

  4. #4
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    And the -A option supresses the display of current (.) and parent (..) directories.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...