LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Show file size in MB not bytes (https://www.linuxquestions.org/questions/linux-general-1/show-file-size-in-mb-not-bytes-896330/)

evansd321 08-09-2011 06:24 AM

Show file size in MB not bytes
 
Hi all,

In BASH, when I do "ls -l" all the files sizes are listed in bytes, is there a command that would show me file sizes in MB?

Thanks

EricTRA 08-09-2011 06:27 AM

Hello,

Try:
Code:

ls -lh
Read the man page for more information.
Code:

man ls
Kind regards,

Eric

blingham 08-09-2011 06:34 AM

I agree with EricTRA. The added h stands for human readable (MB and GB vs Bytes).

Jay

MTK358 08-09-2011 08:47 AM

Quote:

Originally Posted by evansd321 (Post 4437597)
In BASH

ls doesn't have anything to do with bash, it's just an independent program.


All times are GMT -5. The time now is 02:13 AM.