View Full Version : [ubuntu] commnad to get file size in MB
vksingh
June 20th, 2010, 05:44 AM
Hi,
Is there any command to get file size in MB in Ubuntu?
Thanks,
Vivek:confused:
karash
June 20th, 2010, 08:48 AM
This probably isn't in the correct section, but from the command line, you could try:
ls -sh filename
The -s is size, the -h is human readable.
clrg
June 20th, 2010, 09:23 PM
Most commonly used options of ls:
ls -lh --> Permissions and file size
ls -lah --> Permissions and file size on all files
ls -ltrh --> Permissions and file size, sorted on access time (newest is last)
ls -ld --> Permissions, only directories
hictio
June 21st, 2010, 02:50 AM
And, if you want to get not only file, but directory sizes as well, you have to execute:
du -sh directory ENTER
Powered by vBulletin® Version 4.2.2 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.