What is total in "ls -l" command ?


Recommended Posts

  nuka_t said:
the post right above yours was talking about ls -lh.

however, i just checked and ls -l is in kilobytes, not bytes. also, ls -l gives me 12,345 and ls -lh gives 11M

why does it round wrong like that?

You've got a file that's 12345kb? Sounds like you made that one up :whistle:

  Tek said:
Looks more like kilobytes to me.

I have several html files a few kb in size, and here is my output of ls -l

[mark@localhost 192.168.1.2]$ ls -l
total 92
-rw-rw-r--  1 mark mark 5638 Jun  5 12:42 DHCP.htm
-rw-rw-r--  1 mark mark 2997 Jun  5 12:42 DMZ.htm
-rw-rw-r--  1 mark mark 9646 Jun  5 12:42 Filters.htm
-rw-rw-r--  1 mark mark 3133 Jun  5 12:42 Help.htm
-rw-rw-r--  1 mark mark 7586 Jun  5 12:42 index.html
-rw-rw-r--  1 mark mark 3595 Jun  5 12:42 Log.htm
-rw-rw-r--  1 mark mark 3606 Jun  5 12:42 Passwd.htm
-rw-rw-r--  1 mark mark 3572 Jun  5 12:42 RouteDyna.htm
-rw-rw-r--  1 mark mark 5826 Jun  5 12:42 RouteStatic.htm
-rw-rw-r--  1 mark mark 7733 Jun  5 12:42 Security.htm
-rw-rw-r--  1 mark mark 5051 Jun  5 12:42 Status.htm
-rw-rw-r--  1 mark mark 7526 Jun  5 12:42 tmp.gif
-rw-rw-r--  1 mark mark 2051 Jun  5 12:42 Upgrade.htm
-rw-rw-r--  1 mark mark 7450 Jun  5 12:42 Wireless.htm

At least on my Fedora box, it is in bytes.

  nuka_t said:
i just made up a nubmer. what it really was was something like

73,333 rounding down to 72. ill try to post a screenie.

Actually it would be rounding up in that case. Since 73333MB/1024(MB/GB)=71.6GB

If you use --si, then it'll use 1000 instead of 1024.

  nuka_t said:
aaah, gotcha. thats what i thought it was, at first, but i wasnt sure.

Isn't switching between powers of 10 and 2 wonderful? :laugh:

This is why hard drive manufacturers suck, they stick to powers of 10 instead of powers of 2 like they should be :rolleyes:

  kjordan2001 said:
Isn't switching between powers of 10 and 2 wonderful?  :laugh:

This is why hard drive manufacturers suck, they stick to powers of 10 instead of powers of 2 like they should be  :rolleyes:

I know... They even added an --si option to the ls command to put it in "Drive Manufacturer Units" :rofl:

  markjensen said:
I have several html files a few kb in size, and here is my output of ls -l

[mark@localhost 192.168.1.2]$ ls -l
total 92
-rw-rw-r--  1 mark mark 5638 Jun  5 12:42 DHCP.htm
-rw-rw-r--  1 mark mark 2997 Jun  5 12:42 DMZ.htm
-rw-rw-r--  1 mark mark 9646 Jun  5 12:42 Filters.htm
-rw-rw-r--  1 mark mark 3133 Jun  5 12:42 Help.htm
-rw-rw-r--  1 mark mark 7586 Jun  5 12:42 index.html
-rw-rw-r--  1 mark mark 3595 Jun  5 12:42 Log.htm
-rw-rw-r--  1 mark mark 3606 Jun  5 12:42 Passwd.htm
-rw-rw-r--  1 mark mark 3572 Jun  5 12:42 RouteDyna.htm
-rw-rw-r--  1 mark mark 5826 Jun  5 12:42 RouteStatic.htm
-rw-rw-r--  1 mark mark 7733 Jun  5 12:42 Security.htm
-rw-rw-r--  1 mark mark 5051 Jun  5 12:42 Status.htm
-rw-rw-r--  1 mark mark 7526 Jun  5 12:42 tmp.gif
-rw-rw-r--  1 mark mark 2051 Jun  5 12:42 Upgrade.htm
-rw-rw-r--  1 mark mark 7450 Jun  5 12:42 Wireless.htm

At least on my Fedora box, it is in bytes.

In the CODE that you have given, I was asking what that total<92>, 92 was. I dont think that is in bytes.

I know that the fifth column which has <5638>, <2997> those are in bytes, but I wanted to know what is that 92 ???

  sunbiz_3000 said:
In the CODE that you have given, I was asking what that total<92>, 92 was. I dont think that is in bytes.

I know that the fifth column which has <5638>, <2997> those are in bytes, but I wanted to know what is that 92 ???

All of the numbers that I have posted have been about the total at the top not the fifth column. I don't think that some of the others understood your question.

In his example 92 stands for 92 kilobytes not bytes.

  fred666 said:
All of the numbers that I have posted have been about the total at the top not the fifth column. I don't think that some of the others understood your question.

In his example 92 stands for 92 kilobytes not bytes.

Oops! :blush:

You are exactly right, Fred. I was going off the individual file sizes. I guess a picture was literally worth 1000 words, as the output of the ls query helped make things clear what the original poster wanted.

  markjensen said:
Oops! :blush:

You are exactly right, Fred. I was going off the individual file sizes. I guess a picture was literally worth 1000 words, as the output of the ls query helped make things clear what the original poster wanted.

Oops for me too! :blush:

Although we had a few people asking questions on different parts of the output of ls.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • There's absolutely nothing in the WINE license preventing this. Regardless if that sentiment is held by the developers of WINE, it likely doesn't concern the people making Proton nor does it prevent them from adding the support.
    • Multiple competing launchers are unironically a gem on PC gaming—I'm not sure why people don't get that yet. Why replicate Apple's horrible control here? Multiple launchers = multiple stores → lower prices for multi-launcher games Every other con seems minute and irrelevant to a vibrant marketplace where you actually save money. The only real complaints I hear are multiple launchers idle as background tasks + people don't like opening multiple apps. For #1, maybe this OS-based launcher should do shutdown idle launchers like GOG. For #2, virtually all launchers let you create shortcuts. Voila, problem solved.
    • Xbox June Update brings unsynced save management, publisher browsing, and more by Pulasthi Ariyasinghe June has been a busy month for Microsoft, bringing major software upgrades across its product stack. It even announced new hardware for its Xbox lineup, finally entering the handheld gaming space. The company's roundup for this month's new features has now been published, and it's touting a great deal of changes. To start off on the PC side, the Xbox app on the platform now has a section to browse by publishers. The company says that this will let players easily discover more games made by their favorite developers and franchises. Copilot for Gaming also landed in beta form recently, letting users ask AI for help when a game gets too difficult. It's only available for iOS and Android for now, with ROG Xbox Ally support coming later this year. Another feature that will hit the Xbox Ally is the new universal launcher feature for the Xbox app on PC. Microsoft just kicked off Xbox Insider testing for this functionality earlier today. Get all the details here. Over on consoles, the ability to hide system apps, pin favorites to the list, and reduce the number of tiles displayed are now available. Game Hubs also arrived as a fresh feature to easily display relevant information when selecting a game to play, offering data on player stats, achievements, friends currently playing, recent captures, available add-ons, events, and more. Double-tapping the play button will quick-launch the game instead. On both Xbox consoles and in the cloud, a new progress bar will now appear when a save has been left behind on a device in an offline state. "A new progress bar, device names, timestamps, and additional details are now displayed when you have previous game saves on another device in an unsynced state," says the company. Microsoft has also added mouse and keyboard controls as well as touch controls for more cloud games this month. These join the fresh additions that have landed on the 'Stream your own game' collection and the Retro Classics app. Check out the full lists on the announcement page here. On top of all this, Microsoft has also announced that Xbox will be at Gamescom this year. While no details have been announced yet, more announcements from Xbox Game Studios may happen at the major gaming event.
    • Hopefully this is a precurser to them linking other launchers to the Xbox console. With this current gen the Xbox has had dismal sales compared to the competition. If they did support Steam, Epic, Ubisoft Connect, etc etc they'd crush on the next gen battle.
    • My update. Didn't see much point in the top panel since global menu isn't there, so going with a win/kde layout now. Overall, I would say Gnome is a disappointment - it's been 15 years and you still have to rely on a bunch of extensions to get anything useful out of it. At the same time, the way Universal Blue / Bluefin is approaching the desktop feels like what Ubuntu should have started doing five years ago (no wonder the guy I learned about this from used to work for Canonical). Maybe I should have gone with Aurora (the KDE variant), or Bazzite with KDE, but I think I have Gnome where it works for me now.       
  • Recent Achievements

    • Dedicated
      Camlann earned a badge
      Dedicated
    • Week One Done
      fredss earned a badge
      Week One Done
    • Dedicated
      fabioc earned a badge
      Dedicated
    • One Month Later
      GoForma earned a badge
      One Month Later
    • Week One Done
      GoForma earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      647
    2. 2
      Michael Scrip
      225
    3. 3
      ATLien_0
      220
    4. 4
      +FloatingFatMan
      144
    5. 5
      Xenon
      136
  • Tell a friend

    Love Neowin? Tell a friend!