bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#58881: Question: df Size


From: linux
Subject: bug#58881: Question: df Size
Date: Sat, 29 Oct 2022 21:31:24 +0200
User-agent: GWP-Draft

============{  $ LC_ALL='C' ./df -h  /dev/sda2  Filesystem      Size  
Used Avail Use% Mounted on  /dev/sda2       101G   21G   75G  22% /  
============}  ============{  $ LC_ALL='C' lsblk -o 
NAME,FSTYPE,SIZE,MOUNTPOINT /dev/sda2  NAME FSTYPE   SIZE MOUNTPOINT  sda2 ext4 
  102.4G /  ============}   Second example:  ========{  $ LC_ALL='C' 
lsblk -bo NAME,SIZE /dev/sda2  NAME         SIZE  sda2 109959970816  ========}  
========{  $ LC_ALL='C' ./df -k  /dev/sda2  Filesystem     1K-blocks    
 Used Available Use% Mounted on  /dev/sda2      105110296 21984284  77740492  
23% /  ========}   105110296*1000 = 105110296000  105110296*1024 = 107632943104 
  For example,  however exists more tools.  ===================={  $ sudo 
dumpe2fs -h /dev/sda2 | grep "size\|count"  dumpe2fs 1.46.5 
(30-Dec-2021)  Filesystem features:      has_journal ext_attr resize_inode 
dir_index filetype needs_recovery extent 64bit flex_bg sparse_super large_file 
huge_file dir_nlink extra_isize metadata_csum  Inode count:              
6717440  Block count:              26845696  Reserved block count:     1342284  
Block size:               4096  Fragment size:            4096  Group 
descriptor size:    64  Flex block group size:    16  Mount count:              
216  Maximum mount count:      -1  Inode size:           256  Required extra 
isize:     32  Desired extra isize:      32  Total journal size:       512M  
====================}   Block size * Block count = 109959970816   I don't 
know C.  Can you write in " man " why df shows  different result than  
lsblk ?   Tested on Ubuntu 22.04  coreutils from source code  ========{  $ 
LC_ALL=C ./df --version  df (GNU coreutils) 9.1  ========}


reply via email to

[Prev in Thread] Current Thread [Next in Thread]