How to get the file size in Megabytes ( MB ) in linux


I need to get the size of files in a directory in MegaBytes (MB). Which command I can use to see the size of files in MB?


When you run ls -la command in linux, it shows you the file size in KB ( Kilobytes). To see the file size in MegaBytes ( MB) , use below command.

ls -la --block-size=M

1 comment: