Regarding du and ll output

Hi,

I have some doubts regarding the output of "du" command.
In man page I could see that with "-k" I can get the size in Kilo bytes.
When I do ll on a file the output is in bytes.
I have some requirement to find the size of a file and directories in MegaBytes (MB) for that I am doing a du -k on them and converting the output to MB by dividing it by 1024.
Am I doing right here? Should I use ll as I could see a big difference between both.
Please help me understand.

 
-k             Gives the block count in 1024-byte blocks.            

Depending of your OS, du has -m (mega) -g (giga) options...

Nope :frowning: Mine doesnt have those options.

`du` and `ls -l` do not report the same thing. du is reporting the amount of space allocated to the file, while `ls -l` reports the size of the file (which is often less than the amount of space allocated for it on a block device).

Note: I'm assuming "ll" is an alias for "ls -l".

Regards,
Alister