Xfce Forum

Sub domains
 

You are not logged in.

#1 2013-08-06 04:59:22

TuxLyn
Guest

Thunar File or Folder Size ?

Why is thunar folder or file sizes are way diferent from what "du" or "ls" command shows ?

Lets take for example "wordpress-3.6.tar.gz" archive and look in thunar under "Size" column in "Detailed List" view.

Thunar size resull is: 4.0 MB

Now lets run few terminal commands.

$ du -k wordpress-3.6.tar.gz
3936     wordpress-3.6.tar.gz

$ du -h wordpress-3.6.tar.gz
3.9M  wordpress-3.6.tar.gz

$ ls -h wordpress-3.6.tar.gz
3.9M  wordpress-3.6.tar.gz

I know that thunar rounds file and folder sizes, but it would be nice if had the option to
display simular sizes to what "du" and "ls" shows in our detailed size columns.

Because some times for example folder size in thunar is "34.4 MB" and in "du" and "ls" its about "36 MB" etc.

#2 2013-08-06 16:13:55

stqn
Member
Registered: 2010-10-11
Posts: 174

Re: Thunar File or Folder Size ?

Make this test:

$ dd of=/tmp/test if=/dev/zero count=1 bs=1000000
1+0 records in
1+0 records out
1000000 bytes (1.0 MB) copied, 0.00156125 s, 641 MB/s
$ du -h /tmp/test
980K	/tmp/test
$ dd of=/tmp/test if=/dev/zero count=1 bs=1024k  
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.001658 s, 632 MB/s
$ du -h /tmp/test                              
1.0M	/tmp/test

Thunar uses the MB unit (MegaByte or 1000000 bytes), while du uses the MiB unit (MebiByte or 1048576 bytes).

Last edited by stqn (2013-08-06 16:14:44)

Offline

Board footer

Powered by FluxBB